https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97909
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Note that all folding may only ever access SSA use-def chains and cannot rely on immediate uses. Also it may not use context (aka gimple_bb of def stmts) so I have a hard time seeing on-demand range compute to work from the folding context.