re PR target/19116 (-funsafe-math-optimizations make nan compares equal to one anothe...
authorRichard Guenther <rguenther@suse.de>
Sat, 21 Oct 2006 10:40:57 +0000 (10:40 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Sat, 21 Oct 2006 10:40:57 +0000 (10:40 +0000)
2006-10-21  Richard Guenther  <rguenther@suse.de>

PR target/19116
* config/i386/i386.c (override_options): Do not set MASK_IEEE_FP
if flag_unsafe_math_optimizations is specified.  We have
flag_finite_math_only for that.
* config/i386/i386.md (sqrtxf2): Do not require TARGET_IEEE_FP
or flag_unsafe_math_optimizations.

From-SVN: r117930

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.md

index bbf20f922862e84e1399e93447fafec302114cac..0bb59aab9b185909a59637596a147a4cff1cf092 100644 (file)
@@ -1,3 +1,12 @@
+2006-10-21  Richard Guenther  <rguenther@suse.de>
+
+       PR target/19116
+       * config/i386/i386.c (override_options): Do not set MASK_IEEE_FP
+       if flag_unsafe_math_optimizations is specified.  We have
+       flag_finite_math_only for that.
+       * config/i386/i386.md (sqrtxf2): Do not require TARGET_IEEE_FP
+       or flag_unsafe_math_optimizations.
+
 2006-10-21  Richard Guenther  <rguenther@suse.de>
 
        * builtins.c (fold_builtin_classify): Fix typo.
index 6be47cdb410243750bc937970e0aeae1e1f33241..8b2c798077c3ea7c36768244258df4edd0661c40 100644 (file)
@@ -1847,7 +1847,7 @@ 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 (flag_unsafe_math_optimizations)
+  if (flag_finite_math_only)
     target_flags &= ~MASK_IEEE_FP;
 
   /* If the architecture always has an FPU, turn off NO_FANCY_MATH_387,
index 639f0b44f744a814de9a770c92e42930349d66f5..d24b32af42ebb074044eab2f5bffdc8c3a0277f2 100644 (file)
 (define_insn "sqrtxf2"
   [(set (match_operand:XF 0 "register_operand" "=f")
        (sqrt:XF (match_operand:XF 1 "register_operand" "0")))]
-  "TARGET_USE_FANCY_MATH_387 
-   && (TARGET_IEEE_FP || flag_unsafe_math_optimizations) "
+  "TARGET_USE_FANCY_MATH_387"
   "fsqrt"
   [(set_attr "type" "fpspc")
    (set_attr "mode" "XF")