tree-optimization/107153 - autopar SSA update issue
commit89228e3985c5cdf6be58a3b5b1afcad91e9e3422
authorRichard Biener <rguenther@suse.de>
Fri, 7 Oct 2022 08:28:56 +0000 (7 10:28 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 7 Oct 2022 12:27:37 +0000 (7 14:27 +0200)
tree64cb2893ff0393c6e3f5c4032dfd03054febeb55
parent6bd2c1231a95e257dd590754430bdb191b3bca11
tree-optimization/107153 - autopar SSA update issue

autopar performs insertion of stores, eventually requiring a
virtual loop PHI and assorted LC PHI adjustments which we intend
to do once after the pass finishes.  But we also perform intermediate
update_ssa after loop duplication which can lose this fact.  The
following forces renaming of the virtual operand before the final
SSA update to fix that.  It also removes the explicit update_ssa
call from the gimple_duplicate_sese_tail utility as has been done
for all other such utilities and instead performs the SSA update
from autopar.

PR tree-optimization/107153
* tree-cfg.cc (gimple_duplicate_sese_tail): Do not update
SSA form here.
* tree-parloops.cc (gen_parallel_loop): Update SSA form
after to-exit-first transform, no PHI insertion is necessary.
(pass_parallelize_loops::execute): Force re-write of the
virtual operand SSA web.

* gcc.dg/autopar/pr107153.c: New testcase.
gcc/testsuite/gcc.dg/autopar/pr107153.c [new file with mode: 0644]
gcc/tree-cfg.cc
gcc/tree-parloops.cc