tree-optimization/108825 - checking ICE with unroll-and-jam
authorRichard Biener <rguenther@suse.de>
Mon, 20 Feb 2023 08:54:37 +0000 (09:54 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 20 Feb 2023 08:54:37 +0000 (09:54 +0100)
commitae113080a9f98e807db239f3ad2157c64324542f
treea406e30e1f07d830c46566e146fabd2f1c5f39cd
parentca31bc3366c533a55bfd7f1b9f4959c0c9869a7b
tree-optimization/108825 - checking ICE with unroll-and-jam

The issue is that unroll-and-jam applies RPO VN on the transformed body but
that leaves the IL in "indetermined" state (it returns a TODO to make it
valid again).  But unroll-and-jam then continues to transform another loop and
in using the tree_unroll_loop helper runs into tree_transform_and_unroll_loop
performing IL checking on the whole function.

While the real fix is to elide all such checking I'm only making the
loop-local LC SSA verifier not perform function-wide SSA verification
at this point.

PR tree-optimization/108825
* tree-ssa-loop-manip.cc (verify_loop_closed_ssa): For
loop-local verfication only verify there's no pending SSA
update.

* gcc.dg/torture/pr108825.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr108825.c [new file with mode: 0644]
gcc/tree-ssa-loop-manip.cc