aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-07-05 11:53:07 +0200
committerRichard Biener <rguenther@suse.de>2021-07-05 12:51:52 +0200
commit38872c6c0db1b10b17d3913b277c499913208d0b (patch)
treea087fa7566028ee8ae1fd2215c3163af242f28da /gcc
parentccb4e0774b3e5859ea1d7f1864b02fa5826c4a79 (diff)
downloadgcc-38872c6c0db1b10b17d3913b277c499913208d0b.zip
gcc-38872c6c0db1b10b17d3913b277c499913208d0b.tar.gz
gcc-38872c6c0db1b10b17d3913b277c499913208d0b.tar.bz2
middle-end/101291 - set loop copy of versioned loop
This fixes the vectorizer loop versioning code failing to clear niter related info on the scalar loop as it assumed get_loop_copy would work even for the outermost loop. The patch makes that assumption hold by adjusting the loop versioning code. 2021-07-05 Richard Biener <rguenther@suse.de> PR middle-end/101291 * cfgloopmanip.c (loop_version): Set the loop copy of the versioned loop to the new loop.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cfgloopmanip.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c
index e6df280..2af59fe 100644
--- a/gcc/cfgloopmanip.c
+++ b/gcc/cfgloopmanip.c
@@ -1731,6 +1731,7 @@ loop_version (class loop *loop,
then_scale, else_scale);
copy_loop_info (loop, nloop);
+ set_loop_copy (loop, nloop);
/* loopify redirected latch_edge. Update its PENDING_STMTS. */
lv_flush_pending_stmts (latch_edge);