This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix ia64 gcc.c-torture/execute/ieee/980619-1.c


Regression caused by

2004-12-20  Zdenek Dvorak  <dvorakz@suse.cz>

        PR rtl-optimization/18942
        * simplify-rtx.c (simplify_relational_operation_1): Simplify
        x + cst1 == cst2 to x == cst2 - cst1.  Made static.

Tested on ia64-linux.


r~

        * simplify-rtx.c (simplify_relational_operation_1): Don't simplify
        plus/minus across EQ for floating-point.

Index: simplify-rtx.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/simplify-rtx.c,v
retrieving revision 1.217
diff -c -p -d -u -r1.217 simplify-rtx.c
--- simplify-rtx.c	20 Dec 2004 20:48:53 -0000	1.217
+++ simplify-rtx.c	27 Dec 2004 03:28:52 -0000
@@ -2807,7 +2807,8 @@ simplify_relational_operation_1 (enum rt
   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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]