This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
"Fix" recent povray failure with -mfpmath=sse -ffast-math
- From: Uros Bizjak <uros at kss-loka dot si>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard Henderson <rth at redhat dot com>
- Date: Mon, 17 Jan 2005 18:30:15 +0100
- Subject: "Fix" recent povray failure with -mfpmath=sse -ffast-math
Hello!
This patch will "fix" wrong raytraced pictures from povray when
-mfpmath=sse -ffast-math is used. It looks like there is something wrong
with SSE compares for !TARGET_IEEE_FP.
Uros.
Index: i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.777
diff -u -p -r1.777 i386.c
--- i386.c 14 Jan 2005 00:33:48 -0000 1.777
+++ i386.c 17 Jan 2005 17:22:52 -0000
@@ -1465,8 +1465,10 @@ override_options (void)
/* If we're doing fast math, we don't care about comparison order
wrt NaNs. This lets us use a shorter comparison sequence. */
+#if 0
if (flag_unsafe_math_optimizations)
target_flags &= ~MASK_IEEE_FP;
+#endif
/* If the architecture always has an FPU, turn off NO_FANCY_MATH_387,
since the insns won't need emulation. */