From 94a3e63aca7046a958925c13d094234d3e7421b3 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Mon, 16 May 2005 04:36:09 +0000 Subject: [PATCH] tree-scalar-evolution.c (set_nb_iterations_in_loop): Only check for TREE_OVERFLOW on INTEGER_CST trees. * 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. From-SVN: r99765 --- gcc/ChangeLog | 7 +++++++ gcc/tree-chrec.c | 6 ++++-- gcc/tree-scalar-evolution.c | 5 +++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c0f039ae37c..ce284d11cf5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-05-15 Roger Sayle + + * 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 PR target/21551 diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c index 967a3cd8158..cb72df0aad3 100644 --- a/gcc/tree-chrec.c +++ b/gcc/tree-chrec.c @@ -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 diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c index e0ef0ee3308..4019f78c0ae 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -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)) -- 2.30.2