PR rtl-optimization/28634
* reorg.c (fill_slots_from_thread): Do not assume A + X - X == A
for floating-point modes unless flag_unsafe_math_optimizations.
gcc/testsuite/
PR rtl-optimization/28634
* gcc.c-torture/execute/ieee/pr28634.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116124
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-08-14 Richard Sandiford <richard@codesourcery.com>
+
+ PR rtl-optimization/28634
+ * reorg.c (fill_slots_from_thread): Do not assume A + X - X == A
+ for floating-point modes unless flag_unsafe_math_optimizations.
+
2006-08-13 Alexandre Oliva <aoliva@redhat.com>
Andrew Pinski <pinskia@physics.uc.edu>
dest = SET_DEST (pat), src = SET_SRC (pat);
if ((GET_CODE (src) == PLUS || GET_CODE (src) == MINUS)
&& rtx_equal_p (XEXP (src, 0), dest)
+ && (!FLOAT_MODE_P (GET_MODE (src))
+ || flag_unsafe_math_optimizations)
&& ! reg_overlap_mentioned_p (dest, XEXP (src, 1))
&& ! side_effects_p (pat))
{
+2006-08-14 Richard Sandiford <richard@codesourcery.com>
+
+ PR rtl-optimization/28634
+ * gcc.c-torture/execute/ieee/pr28634.c: New test.
+
2006-08-13 Alexandre Oliva <aoliva@redhat.com>
PR c/27184
--- /dev/null
+/* PR rtl-optimization/28634. On targets with delayed branches,
+ dbr_schedule could do the next iteration's addition in the
+ branch delay slot, then subtract the value again if the branch
+ wasn't taken. This can lead to rounding errors. */
+double x = -0x1.0p53;
+double y = 1;
+int
+main (void)
+{
+ while (y > 0)
+ y += x;
+ if (y != x + 1)
+ abort ();
+ exit (0);
+}