https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117922
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- One issue in fold-mem-offsets is that it seems to do per-BB operation but relies on global DF and looks at uses/defs also not within a BB? If it's supposed to be "global" then a better order than FOR_ALL_BB_FN might improve things. I'll note too many bitmaps in general and relying on UD and DU chains which are slow and expensive to compute (RD) instead of using RTL-SSA or doing most work in a simple scan-forward way rather than using full-blown DF.