OSDN Git Service

* tree-scalar-evolution.c (set_nb_iterations_in_loop): Only
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 May 2005 04:36:09 +0000 (04:36 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 May 2005 04:36:09 +0000 (04:36 +0000)
check for TREE_OVERFLOW on INTEGER_CST trees.
* tree-chrec.c (chrec_convert): Only clear TREE_OVERFLOW on
CONSTANT_CLASS_P tree nodes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99765 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-chrec.c
gcc/tree-scalar-evolution.c

index c0f039a..ce284d1 100644 (file)
@@ -1,3 +1,10 @@
+2005-05-15  Roger Sayle  <roger@eyesopen.com>
+
+       * tree-scalar-evolution.c (set_nb_iterations_in_loop): Only
+       check for TREE_OVERFLOW on INTEGER_CST trees.
+       * tree-chrec.c (chrec_convert): Only clear TREE_OVERFLOW on
+       CONSTANT_CLASS_P tree nodes.
+
 2005-05-15  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/21551
index 967a3cd..cb72df0 100644 (file)
@@ -1062,9 +1062,11 @@ chrec_convert (tree type,
        tree res = fold_convert (type, chrec);
 
        /* Don't propagate overflows.  */
-       TREE_OVERFLOW (res) = 0;
        if (CONSTANT_CLASS_P (res))
-         TREE_CONSTANT_OVERFLOW (res) = 0;
+         {
+           TREE_CONSTANT_OVERFLOW (res) = 0;
+           TREE_OVERFLOW (res) = 0;
+         }
 
        /* But reject constants that don't fit in their type after conversion.
           This can happen if TYPE_MIN_VALUE or TYPE_MAX_VALUE are not the
index e0ef0ee..4019f78 100644 (file)
@@ -922,8 +922,9 @@ set_nb_iterations_in_loop (struct loop *loop,
      count of the loop in order to be compatible with the other
      nb_iter computations in loop-iv.  This also allows the
      representation of nb_iters that are equal to MAX_INT.  */
-  if ((TREE_CODE (res) == INTEGER_CST && TREE_INT_CST_LOW (res) == 0)
-      || TREE_OVERFLOW (res))
+  if (TREE_CODE (res) == INTEGER_CST
+      && (TREE_INT_CST_LOW (res) == 0
+         || TREE_OVERFLOW (res)))
     res = chrec_dont_know;
   
   if (dump_file && (dump_flags & TDF_DETAILS))