From c3ffea50514f9cd804d69ee6a4bdd789112c3245 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 12 Jan 2001 12:12:34 +0100 Subject: [PATCH] combine.c (reversed_comparison): Fix typo in last patch. * combine.c (reversed_comparison): Fix typo in last patch. Check X for NULL. (combine_reversed_comparison_code): Make static to follow prototype declaration. Co-Authored-By: Jan Hubicka From-SVN: r38942 --- gcc/ChangeLog | 8 ++++++++ gcc/combine.c | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1d8e146..5dca785 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +Fri Jan 12 12:08:12 MET 2001 Andreas Jaeger + Jan Hubicka + + * combine.c (reversed_comparison): Fix typo in last patch. + Check X for NULL. + (combine_reversed_comparison_code): Make static to follow + prototype declaration. + 2001-01-12 Phil Edwards * install.texi: Remove misplaced duplicate entry. diff --git a/gcc/combine.c b/gcc/combine.c index 53857ed..055cfc3 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -11123,7 +11123,7 @@ simplify_comparison (code, pop0, pop1) /* Like jump.c' reversed_comparison_code, but use combine infrastructure for searching backward. */ -enum rtx_code +static enum rtx_code combine_reversed_comparison_code (exp) rtx exp; { @@ -11135,8 +11135,8 @@ combine_reversed_comparison_code (exp) return code1; /* Otherwise try and find where the condition codes were last set and use that. */ - x = get_last_value (XEXP (x, 0)); - if (GET_CODE (x) != COMPARE) + x = get_last_value (XEXP (exp, 0)); + if (!x || GET_CODE (x) != COMPARE) return UNKNOWN; return reversed_comparison_code_parts (GET_CODE (exp), XEXP (x, 0), XEXP (x, 1), NULL); -- 2.7.4