aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2006-10-21 10:40:57 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2006-10-21 10:40:57 +0000
commit5a4171a01d9f9041175a6b7c473ed43a623bea0b (patch)
tree920fe30a666b06d4d7b205bcb081ff810fd269c1
parent120a56cb6790478018765a520376d2f304bdb74c (diff)
downloadgcc-5a4171a01d9f9041175a6b7c473ed43a623bea0b.zip
gcc-5a4171a01d9f9041175a6b7c473ed43a623bea0b.tar.gz
gcc-5a4171a01d9f9041175a6b7c473ed43a623bea0b.tar.bz2
re PR target/19116 (-funsafe-math-optimizations make nan compares equal to one another (-finite-math-only should be doing that))
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
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/i386/i386.c2
-rw-r--r--gcc/config/i386/i386.md3
3 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bbf20f9..0bb59aa 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
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.
2006-10-21 Richard Guenther <rguenther@suse.de>
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 6be47cd..8b2c798 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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,
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 639f0b4..d24b32a 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -15560,8 +15560,7 @@
(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")