https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102844
--- Comment #22 from Andrew Macleod <amacleod at redhat dot com> --- (In reply to Richard Biener from comment #20) > (In reply to Aldy Hernandez from comment #18) > > (In reply to rguent...@suse.de from comment #17) > > > On Wed, 20 Oct 2021, aldyh at gcc dot gnu.org wrote: > > > > > > Silly question, why is the SSA form invalid on entry to VRP2? That's > > > > just > > > > asking for trouble. Is this related to how asserts work? > > > > > > Well, DOM threading creates invalid SSA (definition not dominating use). > > > Doesn't have to do anything with VRP or asserts. > > > > Ah, I see. > > > > BTW, if this is still the case in mainline, this is bound to be a problem > > for the ranger. Andrew, won't we get an UNDEFINED / unreachable if we query > > the non dominating use at this point? > > Well, invalid IL is invalid - there's no need to "cope" with it. We have to > fix the (forward) threading code. Indeed, invalid is invalid. And it depends. Any on-entry range is the union of all incoming blocks. If we query a use that has no def anywhere in the dominator tree , then you will get UNDEFINED. If the def is on at least one incoming path, then you will get the def or some derivative of it.