diff options
author | Richard Biener <rguenther@suse.de> | 2019-06-03 10:17:16 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-06-03 10:17:16 +0000 |
commit | efb34006e9c3f9592edd77bda2e57ce14c65579b (patch) | |
tree | 6660427cb8fcaf3711094d343b0a312dd07f7c7f /gcc/tree-loop-distribution.c | |
parent | 3a0afad0d212b3ff213b393728e018caf2daa526 (diff) | |
download | gcc-efb34006e9c3f9592edd77bda2e57ce14c65579b.zip gcc-efb34006e9c3f9592edd77bda2e57ce14c65579b.tar.gz gcc-efb34006e9c3f9592edd77bda2e57ce14c65579b.tar.bz2 |
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.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index b2f2fd2..88f8e7a 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); |