diff options
author | Richard Biener <rguenther@suse.de> | 2018-10-01 13:10:48 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-10-01 13:10:48 +0000 |
commit | fd5c626c681266845dbec0e84836823a5de3a45b (patch) | |
tree | 3e60ee6ae49b556bdc32cca73efdca0ec40d09db /gcc/tree-ssa-loop-ivcanon.c | |
parent | 329130cc40cc7b061690a2e8b416f1798e2fd36a (diff) | |
download | gcc-fd5c626c681266845dbec0e84836823a5de3a45b.zip gcc-fd5c626c681266845dbec0e84836823a5de3a45b.tar.gz gcc-fd5c626c681266845dbec0e84836823a5de3a45b.tar.bz2 |
re PR tree-optimization/87465 (Loop removal regression)
2018-10-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/87465
* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
causing branch miscounts.
* gcc.dg/tree-ssa/cunroll-15.c: New testcase.
From-SVN: r264758
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivcanon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c index 97c2ad9..eeae2a8 100644 --- a/gcc/tree-ssa-loop-ivcanon.c +++ b/gcc/tree-ssa-loop-ivcanon.c @@ -368,8 +368,8 @@ tree_estimate_loop_size (struct loop *loop, edge exit, edge edge_to_cancel, size->non_call_stmts_on_hot_path++; if (((gimple_code (stmt) == GIMPLE_COND && (!constant_after_peeling (gimple_cond_lhs (stmt), stmt, loop) - || constant_after_peeling (gimple_cond_rhs (stmt), stmt, - loop))) + || !constant_after_peeling (gimple_cond_rhs (stmt), stmt, + loop))) || (gimple_code (stmt) == GIMPLE_SWITCH && !constant_after_peeling (gimple_switch_index ( as_a <gswitch *> (stmt)), |