https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128209
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |123298
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
So this would happen when e has one end (or both) outside of the VN region.
OK, so we get called for the entry edge. And that's because it's a loop entry
and we ask for the continuation of a loop PHI.
It seems we are not ensuring that walk_non_aliased_vuses stays inside the
region. In principle the walk could skip both the entry block and its
predecessor, so I have to think a bit about a good way to stop the
walk.
ISTR this has come up before.
The offending code has been added for PR123298.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123298
[Bug 123298] [14 Regression] wrong code at -O2/-O3 since r9-2635