[Bug tree-optimization/117113] [12/13/14/15 regression] ICE on valid code at -O3 with "-fno-tree-dce -fno-inline" on x86_64-linux-gnu: verify_ssa failed since r8-5204-gdc236397e4d966

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 3 14:10:53 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117113

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the issue is that we have an outer loop with a virtual PHI and an inner loop
with just a load.  When unrolling this there's virtual definitions
(from PHIs of the outer loop, but in general also from stores if there
were any) between the two inner loop copies.  fuse_loops () then goes along
merging those blocks (with the VDEFs) but it does not add a loop PHI node
to the inner loop covering the virtual definitions - and that's what is
missing.

Probably a bit artificial because of -fno-tree-dce but not entirely
impossible that a stray loop header PHI for virtuals is around.

I have a patch to reject unroll-and-jam in this situation.


More information about the Gcc-bugs mailing list