combine.c (simplify_comparison): Don't change `code' when can't reverse comparison.
authorGeoffrey Keating <geoffk@redhat.com>
Sun, 14 Jan 2001 10:39:49 +0000 (10:39 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Sun, 14 Jan 2001 10:39:49 +0000 (10:39 +0000)
* combine.c (simplify_comparison): Don't change `code' when
can't reverse comparison.

From-SVN: r39007

gcc/ChangeLog
gcc/combine.c

index 8e7d40ddc2c5fa28452054408e6357d059fab467..785fd26a28fd66bf1b771aa47e860c8302912eba 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-14  Geoffrey Keating  <geoffk@redhat.com>
+
+       * combine.c (simplify_comparison): Don't change `code' when
+       can't reverse comparison.
+
 2001-01-14  Richard Henderson  <rth@redhat.com>
 
        * rtlanal.c (computed_jump_p_1): Rename from jmp_uses_reg_or_mem;
index 055cfc353f0d7b1ca12258a49db42714abb2af00..30b13c8d69207d028e7774568e02f6f3b7978978 100644 (file)
@@ -10710,13 +10710,19 @@ simplify_comparison (code, pop0, pop1)
                  && (STORE_FLAG_VALUE
                      & (((HOST_WIDE_INT) 1
                          << (GET_MODE_BITSIZE (GET_MODE (op0)) - 1))))
-                 && (code == LT || (code == GE))))
+                 && (code == LT || code == GE)))
            {
-             code = (code == LT || code == NE
-                     ? GET_CODE (op0) : combine_reversed_comparison_code (op0));
-             if (code != UNKNOWN)
+             enum rtx_code new_code;
+             if (code == LT || code == NE)
+               new_code = GET_CODE (op0);
+             else
+               new_code = combine_reversed_comparison_code (op0);
+         
+             if (new_code != UNKNOWN)
                {
-                 op0 = tem, op1 = tem1;
+                 code = new_code;
+                 op0 = tem;
+                 op1 = tem1;
                  continue;
                }
            }