https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126175
--- Comment #5 from Cedric Bail <cedric.bail at pm dot me> --- (In reply to Oleg Endo from comment #4) > (In reply to Cedric Bail from comment #3) > > I wanted to see if the idea of "pivot" register was something that make > > sense and got into a session with claude code to see if that was something > > that could be integrated in the lra algorithm. It identified that the code > > had a spot that was responsible for actually redoing the computation of the > > base address and proposed a fairly small patch that make sense, to me. It > > solve the reproduction case and actually seems to improve the result > > compared to even pre lra. I have very narrow knowledge of gcc code base and > > can't tests for other platforms as this is clearly going to impact, but > > likely help, any platform with displacement constraints. > > I'm working on an pass to do general addressing mode selection optimizations. > It's a long story. See also PR 56590. Interesting, let me know if you need some tests on it. > So once this is ready, it should be able to clean up memory accesses > generated by LRA afterwards. Even though the patch is small, perhaps it's > better not to add more weight to LRA. Absolutely. I am uneasy with change in LRA. It is to be noted this would likely impact aarch64 and or1k too, but I have no tests for those.
