simplify-rtx.c (simplify_relational_operation_1): Don't simplify plus/minus across...
authorRichard Henderson <rth@redhat.com>
Mon, 27 Dec 2004 03:31:49 +0000 (19:31 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 27 Dec 2004 03:31:49 +0000 (19:31 -0800)
        * simplify-rtx.c (simplify_relational_operation_1): Don't simplify
        plus/minus across EQ for floating-point.

From-SVN: r92631

gcc/ChangeLog
gcc/simplify-rtx.c

index 2869df4..ef86e13 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-26  Richard Henderson  <rth@redhat.com>
+
+       * simplify-rtx.c (simplify_relational_operation_1): Don't simplify
+       plus/minus across EQ for floating-point.
+       
 2004-12-26  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        PR target/17643
index 8d7cb3f..34b0ab8 100644 (file)
@@ -2807,7 +2807,8 @@ simplify_relational_operation_1 (enum rtx_code code, enum machine_mode mode,
   if ((code == EQ || code == NE)
       && (op0code == PLUS || op0code == MINUS)
       && CONSTANT_P (op1)
-      && CONSTANT_P (XEXP (op0, 1)))
+      && CONSTANT_P (XEXP (op0, 1))
+      && (INTEGRAL_MODE_P (cmp_mode) || flag_unsafe_math_optimizations))
     {
       rtx x = XEXP (op0, 0);
       rtx c = XEXP (op0, 1);