diff options
author | Bin Cheng <bin.cheng@arm.com> | 2015-08-21 10:09:48 +0000 |
---|---|---|
committer | Bin Cheng <amker@gcc.gnu.org> | 2015-08-21 10:09:48 +0000 |
commit | eff1e5afad295545d09985c705952242bc16c2ea (patch) | |
tree | a522662a8c0bd643147a2af4d6d39c9d79330140 /gcc/tree-ssa-loop-niter.c | |
parent | 55b9e2fc7289e8d29e7db4ebedbe01eafff48547 (diff) | |
download | gcc-eff1e5afad295545d09985c705952242bc16c2ea.zip gcc-eff1e5afad295545d09985c705952242bc16c2ea.tar.gz gcc-eff1e5afad295545d09985c705952242bc16c2ea.tar.bz2 |
tree-ssa-loop-niter.c (simplify_using_initial_conditions): Break loop if EXPR is simplified to const value.
* tree-ssa-loop-niter.c (simplify_using_initial_conditions): Break
loop if EXPR is simplified to const value.
From-SVN: r227055
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r-- | gcc/tree-ssa-loop-niter.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index 4e9a2ac..39d6807 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -2083,6 +2083,10 @@ simplify_using_initial_conditions (struct loop *loop, tree expr) if (e->flags & EDGE_FALSE_VALUE) cond = invert_truthvalue (cond); expr = tree_simplify_using_condition (cond, expr); + /* Break if EXPR is simplified to const values. */ + if (expr && (integer_zerop (expr) || integer_nonzerop (expr))) + break; + ++cnt; } |