From 89228e3985c5cdf6be58a3b5b1afcad91e9e3422 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 7 Oct 2022 10:28:56 +0200 Subject: 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/tree-cfg.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'gcc/tree-cfg.cc') diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index 09fa7b6..42f40f1 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -6926,8 +6926,6 @@ gimple_duplicate_sese_tail (edge entry, edge exit, /* Anything that is outside of the region, but was dominated by something inside needs to update dominance info. */ iterate_fix_dominators (CDI_DOMINATORS, doms, false); - /* Update the SSA web. */ - update_ssa (TODO_update_ssa); if (free_region_copy) free (region_copy); -- cgit v1.1