(compare_from_rtx): Allow simplify_relational_operation to fail.
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 12 Jan 1993 22:47:54 +0000 (17:47 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 12 Jan 1993 22:47:54 +0000 (17:47 -0500)
From-SVN: r3204

gcc/expr.c

index 990da71476d504931095a87b76232767a9788ee2..090ec29317ee8e082624676052f15e93e67c3e0d 100644 (file)
@@ -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