aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2006-10-21 10:13:13 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2006-10-21 10:13:13 +0000
commitbdbb046092f1e960c197c9fbc6f6fbe188f4839b (patch)
tree6c093b5eb77bcbd360178a0be1846db44e36d9ec
parent1faf92ae7981649ecfab6499ab2212a0d2d15540 (diff)
downloadgcc-bdbb046092f1e960c197c9fbc6f6fbe188f4839b.zip
gcc-bdbb046092f1e960c197c9fbc6f6fbe188f4839b.tar.gz
gcc-bdbb046092f1e960c197c9fbc6f6fbe188f4839b.tar.bz2
re PR middle-end/28796 (__builtin_nan() and __builtin_unordered() inconsistent)
2006-10-21 Richard Guenther <rguenther@suse.de> PR middle-end/28796 * simplify-rtx.c (simplify_const_relational_operation): Do not constant-fold ORDERED and UNORDERED for flag_unsafe_math_optimizations but only we do not need to honor NaNs for the given mode. From-SVN: r117928
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/simplify-rtx.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9719982..09185e1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,13 @@
2006-10-21 Richard Guenther <rguenther@suse.de>
+ PR middle-end/28796
+ * simplify-rtx.c (simplify_const_relational_operation):
+ Do not constant-fold ORDERED and UNORDERED for
+ flag_unsafe_math_optimizations but only we do not need to
+ honor NaNs for the given mode.
+
+2006-10-21 Richard Guenther <rguenther@suse.de>
+
PR target/29512
* config/i386/i386.c (classify_argument): Remove redundant
walking of the BINFOs.
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 3b12b20..fee07f9 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -3747,10 +3747,10 @@ simplify_const_relational_operation (enum rtx_code code,
return simplify_const_relational_operation (signed_condition (code),
mode, tem, const0_rtx);
- if (flag_unsafe_math_optimizations && code == ORDERED)
+ if (! HONOR_NANS (mode) && code == ORDERED)
return const_true_rtx;
- if (flag_unsafe_math_optimizations && code == UNORDERED)
+ if (! HONOR_NANS (mode) && code == UNORDERED)
return const0_rtx;
/* For modes without NaNs, if the two operands are equal, we know the