aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2004-02-19 09:57:52 -0700
committerJeff Law <law@gcc.gnu.org>2004-02-19 09:57:52 -0700
commitf46e5baad61a5604120e22c7dfa3b77180f2e7ef (patch)
treedfdde74badc4eb5ec6d53f2dd7476a3c78ff7c2f /gcc
parent117def1303721e19f946e71f0c6af602c1c85343 (diff)
downloadgcc-f46e5baad61a5604120e22c7dfa3b77180f2e7ef.zip
gcc-f46e5baad61a5604120e22c7dfa3b77180f2e7ef.tar.gz
gcc-f46e5baad61a5604120e22c7dfa3b77180f2e7ef.tar.bz2
fold-const.c (invert_truthvalue): Do not call invert_tree_comparison for unordered comparison codes.
* fold-const.c (invert_truthvalue): Do not call invert_tree_comparison for unordered comparison codes. From-SVN: r78103
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/fold-const.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6e1808b..f9fa2d3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-19 Jeff Law <law@redhat.com>
+
+ * fold-const.c (invert_truthvalue): Do not call invert_tree_comparison
+ for unordered comparison codes.
+
2004-02-19 Ian Lance Taylor <ian@wasabisystems.com>
* reload1.c (reload): Correct comment.
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index f9b7808..5b39098 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -2636,6 +2636,14 @@ invert_truthvalue (tree arg)
&& code != NE_EXPR
&& code != EQ_EXPR)
return build1 (TRUTH_NOT_EXPR, type, arg);
+ else if (code == UNORDERED_EXPR
+ || code == ORDERED_EXPR
+ || code == UNEQ_EXPR
+ || code == UNLT_EXPR
+ || code == UNLE_EXPR
+ || code == UNGT_EXPR
+ || code == UNGE_EXPR)
+ return build1 (TRUTH_NOT_EXPR, type, arg);
else
return build (invert_tree_comparison (code), type,
TREE_OPERAND (arg, 0), TREE_OPERAND (arg, 1));