summaryrefslogtreecommitdiff
path: root/gcc/tree-loop-distribution.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-06-03 10:17:16 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-06-03 10:17:16 +0000
commitefb34006e9c3f9592edd77bda2e57ce14c65579b (patch)
tree6660427cb8fcaf3711094d343b0a312dd07f7c7f /gcc/tree-loop-distribution.c
parent3a0afad0d212b3ff213b393728e018caf2daa526 (diff)
re PR tree-optimization/90716 (gcc generates wrong debug information at -O2)
2019-06-03 Richard Biener <rguenther@suse.de> PR tree-optimization/90716 * tree-loop-distribution.c (destroy_loop): Process blocks in correct order. * gcc.dg/guality/pr90716.c: New testcase. From-SVN: r271858
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r--gcc/tree-loop-distribution.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index b2f2fd225a4..88f8e7a09d1 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -1104,15 +1104,13 @@ destroy_loop (struct loop *loop)
gimple_stmt_iterator dst_gsi = gsi_after_labels (exit->dest);
bool safe_p = single_pred_p (exit->dest);
- i = nbbs;
- do
+ for (unsigned i = 0; i < nbbs; ++i)
{
/* We have made sure to not leave any dangling uses of SSA
names defined in the loop. With the exception of virtuals.
Make sure we replace all uses of virtual defs that will remain
outside of the loop with the bare symbol as delete_basic_block
will release them. */
- --i;
for (gphi_iterator gsi = gsi_start_phis (bbs[i]); !gsi_end_p (gsi);
gsi_next (&gsi))
{
@@ -1147,7 +1145,6 @@ destroy_loop (struct loop *loop)
gsi_next (&gsi);
}
}
- while (i != 0);
redirect_edge_pred (exit, src);
exit->flags &= ~(EDGE_TRUE_VALUE|EDGE_FALSE_VALUE);