From 35212e617f4eb2420074612b24e0f76724ae5540 Mon Sep 17 00:00:00 2001 From: kenner Date: Sun, 26 Dec 1999 12:43:28 +0000 Subject: [PATCH] * fold-const.c (fold_truthop): Properly check for FP RHS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31091 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/fold-const.c | 8 +++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9957580..44d535c7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Sun Dec 26 07:48:20 1999 Richard Kenner + + * fold-const.c (fold_truthop): Properly check for FP RHS. + 1999-12-24 Mark Mitchell * toplev.h (note_deferall_of_defined_inline_function): Declare. 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); -- 2.7.4