Commit 1d691c53 by Richard Kenner Committed by Richard Kenner

* fold-const.c (fold_truthop): Properly check for FP RHS.

From-SVN: r31091
parent f918cd8a
Sun Dec 26 07:48:20 1999 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* fold-const.c (fold_truthop): Properly check for FP RHS.
1999-12-24 Mark Mitchell <mark@codesourcery.com> 1999-12-24 Mark Mitchell <mark@codesourcery.com>
* toplev.h (note_deferall_of_defined_inline_function): Declare. * toplev.h (note_deferall_of_defined_inline_function): Declare.
......
...@@ -3853,13 +3853,11 @@ fold_truthop (code, truth_type, lhs, rhs) ...@@ -3853,13 +3853,11 @@ fold_truthop (code, truth_type, lhs, rhs)
/* If the RHS can be evaluated unconditionally and its operands are /* If the RHS can be evaluated unconditionally and its operands are
simple, it wins to evaluate the RHS unconditionally on machines simple, it wins to evaluate the RHS unconditionally on machines
with expensive branches. In this case, this isn't a comparison with expensive branches. In this case, this isn't a comparison
that can be merged. */ that can be merged. Avoid doing this if the RHS is a floating-point
comparison since those can trap. */
/* @@ I'm not sure it wins on the m88110 to do this if the comparisons
are with zero (tmw). */
if (BRANCH_COST >= 2 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 (rl_arg)
&& simple_operand_p (rr_arg)) && simple_operand_p (rr_arg))
return build (code, truth_type, lhs, rhs); return build (code, truth_type, lhs, rhs);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment