diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 1999-12-26 12:43:28 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1999-12-26 07:43:28 -0500 |
commit | 1d691c534447434946ede05598e13e37026cf124 (patch) | |
tree | f55350e8d2d9c60d94133211d2dce95f49bd91f0 /gcc/fold-const.c | |
parent | f918cd8a105857173ba523171dabc6ce33944d71 (diff) | |
download | gcc-1d691c534447434946ede05598e13e37026cf124.zip gcc-1d691c534447434946ede05598e13e37026cf124.tar.gz gcc-1d691c534447434946ede05598e13e37026cf124.tar.bz2 |
* fold-const.c (fold_truthop): Properly check for FP RHS.
From-SVN: r31091
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index ed111b4..4eaf4ce 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3853,13 +3853,11 @@ fold_truthop (code, truth_type, lhs, rhs) /* If the RHS can be evaluated unconditionally and its operands are simple, it wins to evaluate the RHS unconditionally on machines with expensive branches. In this case, this isn't a comparison - that can be merged. */ - - /* @@ I'm not sure it wins on the m88110 to do this if the comparisons - are with zero (tmw). */ + that can be merged. Avoid doing this if the RHS is a floating-point + comparison since those can trap. */ if (BRANCH_COST >= 2 - && INTEGRAL_TYPE_P (TREE_TYPE (rhs)) + && ! FLOAT_TYPE_P (TREE_TYPE (rl_arg)) && simple_operand_p (rl_arg) && simple_operand_p (rr_arg)) return build (code, truth_type, lhs, rhs); |