tree-optimization/95717 - fix SSA update for vectorizer epilogue
authorRichard Biener <rguenther@suse.de>
Wed, 17 Jun 2020 12:57:59 +0000 (14:57 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 17 Jun 2020 13:01:25 +0000 (15:01 +0200)
commitd0909f5858ad81e6d8b73fa6193be19cb5e6ed7b
tree30866025a8611fbc7c0b0d983a73fc96cdf05092
parent9efbb03616f556dcceabe364f734b5b11fb13587
tree-optimization/95717 - fix SSA update for vectorizer epilogue

This fixes yet another issue with the custom SSA updating in the
vectorizer when we copy from the non-if-converted loop.  We must
not mess with current defs before we updated the BB copies.

2020-06-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/95717
* tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg):
Move BB SSA updating before exit/latch PHI current def copying.

* g++.dg/torture/pr95717.C: New testcase.
gcc/testsuite/g++.dg/torture/pr95717.C [new file with mode: 0644]
gcc/tree-vect-loop-manip.c