]> gcc.gnu.org Git - gcc.git/commitdiff
* fold-const.c (fold_truthop): Properly check for FP RHS.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Sun, 26 Dec 1999 12:43:28 +0000 (12:43 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Sun, 26 Dec 1999 12:43:28 +0000 (07:43 -0500)
From-SVN: r31091

gcc/ChangeLog
gcc/fold-const.c

index 9957580ea309ae55052a3c97f080c23ed8966321..44d535c769edf0aa6e6a690fd29e07cdcd9d58c8 100644 (file)
@@ -1,3 +1,7 @@
+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>
 
        * toplev.h (note_deferall_of_defined_inline_function): Declare.
index ed111b4f686586622d85b2696b0971ab1d3acb77..4eaf4cef879e17cc96bc1cbc4e6a922a4f91e510 100644 (file)
@@ -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);
This page took 0.088547 seconds and 5 git commands to generate.