From a7c5971afba533de4a1c555f441ce2f4dee55039 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Tue, 12 Jan 1993 17:47:54 -0500 Subject: [PATCH] (compare_from_rtx): Allow simplify_relational_operation to fail. From-SVN: r3204 --- gcc/expr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/expr.c b/gcc/expr.c index 990da71476d..090ec29317e 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -7109,11 +7109,13 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size, align) rtx size; int align; { + rtx tem; + /* If one operand is constant, make it the second one. */ if (GET_CODE (op0) == CONST_INT || GET_CODE (op0) == CONST_DOUBLE) { - rtx tem = op0; + tem = op0; op0 = op1; op1 = tem; code = swap_condition (code); @@ -7127,8 +7129,9 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size, align) do_pending_stack_adjust (); - if (GET_CODE (op0) == CONST_INT && GET_CODE (op1) == CONST_INT) - return simplify_relational_operation (code, mode, op0, op1); + if (GET_CODE (op0) == CONST_INT && GET_CODE (op1) == CONST_INT + && (tem = simplify_relational_operation (code, mode, op0, op1)) != 0) + return tem; #if 0 /* There's no need to do this now that combine.c can eliminate lots of -- 2.30.2