aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorMichael Tiemann <michael@impact.tiemann.org>1998-09-19 23:27:02 +0000
committerJeff Law <law@gcc.gnu.org>1998-09-19 17:27:02 -0600
commita58bd5080ad5fc39a02eb1e786f71615ed3146fe (patch)
treebf68cba9a0bcd3905cd9990cc6ba8f391559f0f1 /gcc/fold-const.c
parent750930c1f87332d91ef00835a8e3bb4cd2e028f9 (diff)
downloadgcc-a58bd5080ad5fc39a02eb1e786f71615ed3146fe.zip
gcc-a58bd5080ad5fc39a02eb1e786f71615ed3146fe.tar.gz
gcc-a58bd5080ad5fc39a02eb1e786f71615ed3146fe.tar.bz2
fold-const.c (fold): Fix typo in COND_EXPR handling code.
* fold-const.c (fold): Fix typo in COND_EXPR handling code. (invert_truthvalue): Enable truthvalue inversion for floating-point operands if -ffast-math. From-SVN: r22488
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 8a289a8..5eab656 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);
}
}