tree-optimization/106521 - unroll-and-jam LC SSA rewrite
authorRichard Biener <rguenther@suse.de>
Thu, 4 Aug 2022 09:55:15 +0000 (11:55 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 4 Aug 2022 13:01:38 +0000 (15:01 +0200)
commitd8552eaddc40b72461158e56b5db8709f2eb21ed
tree67182b106d8fde0d150858dac0bb1ad0fd1d9dac
parentd86d81a449c03641e079f23a2b3e1b2279a162fe
tree-optimization/106521 - unroll-and-jam LC SSA rewrite

The LC SSA rewrite performs SSA verification at start but the VN
run performed on the unrolled-and-jammed body can leave us with
invalid SSA form until CFG cleanup is run.  So make sure we do that
before rewriting into LC SSA.

PR tree-optimization/106521
* gimple-loop-jam.cc (tree_loop_unroll_and_jam): Perform
CFG cleanup manually before rewriting into LC SSA.

* gcc.dg/torture/pr106521.c: New testcase.
gcc/gimple-loop-jam.cc
gcc/testsuite/gcc.dg/torture/pr106521.c [new file with mode: 0644]