Revert this change. Gavin's patch to operand_equal_p is a better fix.
authorJeffrey A Law <law@cygnus.com>
Mon, 20 Sep 1999 17:12:03 +0000 (17:12 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 20 Sep 1999 17:12:03 +0000 (11:12 -0600)
         * fold-const.c (fold_range_test): Do not try to fold the range
         test if the rhs or lhs has side effects.

From-SVN: r29526

gcc/ChangeLog
gcc/fold-const.c

index cfb83bcda0dae5ae1477034f8b23ffb28344676d..a603dc06e347b888294afb81c7a7a589cccfbe22 100644 (file)
@@ -24,6 +24,10 @@ Mon Sep 20 14:43:37 1999  Nick Clifton  <nickc@cygnus.com>
 
 Mon Sep 20 05:41:36 1999  Jeffrey A Law  (law@cygnus.com)
 
+       Revert this change.  Gavin's patch to operand_equal_p is a better fix.
+        * fold-const.c (fold_range_test): Do not try to fold the range
+        test if the rhs or lhs has side effects.
+
        * basic-block.h (compute_flow_dominators): Declare.
 
        * gcse.c (alloc_code_hoist_mem): New function.
index 7fe6f25fe2364baa12b0ff4389185b2db96d57f0..54eeb452eb51d32458b330da15281e81f705cde3 100644 (file)
@@ -3571,10 +3571,6 @@ fold_range_test (exp)
   tree rhs = make_range (TREE_OPERAND (exp, 1), &in1_p, &low1, &high1);
   tree tem;
 
-  /* Fail if anything is volatile.  */
-  if (TREE_SIDE_EFFECTS (lhs) || TREE_SIDE_EFFECTS (rhs))
-    return 0;
-
   /* If this is an OR operation, invert both sides; we will invert
      again at the end.  */
   if (or_op)