https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117572
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2024-11-14 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- reassoc should be the enabler to optimize this - rank computation is probably in the need of adjustment for pointer '(constant)' -> integer conversions so the two &p based pointers are associated together. Then match.pd patterns should do the trick. Similar issue for (sizetype)(p p+ 5) vs (sizetype)p probably. You should be able to write small testcases doing the integer conversions manually btw.