summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-09-19 23:27:02 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-09-19 23:27:02 +0000
commitb3744b6b4edf4790eb8d69e25eb29f867c3acc5a (patch)
treebf68cba9a0bcd3905cd9990cc6ba8f391559f0f1
parent5c61dffde4155ade15ba96592de9c109114853ed (diff)
downloadgcc-b3744b6b4edf4790eb8d69e25eb29f867c3acc5a.tar.gz
* fold-const.c (fold): Fix typo in COND_EXPR handling code.
(invert_truthvalue): Enable truthvalue inversion for floating-point operands if -ffast-math. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22488 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/fold-const.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 65d67d589f0..ae27929bc5a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Sun Sep 20 00:22:23 1998 Michael Tiemann <michael@impact.tiemann.org>
+
+ * fold-const.c (fold): Fix typo in COND_EXPR handling code.
+ (invert_truthvalue): Enable truthvalue inversion for
+ floating-point operands if -ffast-math.
+
Sat Sep 19 23:58:07 1998 Melissa O'Neill <oneill@cs.sfu.ca>
* configure.in: Disable collect2 for nextstep. Instead use
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 8a289a81709..5eab6562282 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -2230,7 +2230,7 @@ invert_truthvalue (arg)
if (TREE_CODE_CLASS (code) == '<')
{
if (FLOAT_TYPE_P (TREE_TYPE (TREE_OPERAND (arg, 0)))
- && code != NE_EXPR && code != EQ_EXPR)
+ && !flag_fast_math && code != NE_EXPR && code != EQ_EXPR)
return build1 (TRUTH_NOT_EXPR, type, arg);
else
return build (invert_tree_comparison (code), type,
@@ -5824,7 +5824,8 @@ fold (expr)
t = build (code, type, tem,
TREE_OPERAND (t, 2), TREE_OPERAND (t, 1));
arg0 = tem;
- arg1 = TREE_OPERAND (t, 2);
+ /* arg1 should be the first argument of the new T. */
+ arg1 = TREE_OPERAND (t, 1);
STRIP_NOPS (arg1);
}
}