https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114978
--- Comment #35 from Chen Chen <chz0808 at gmail dot com> --- (In reply to chenglulu from comment #34) > (In reply to Xi Ruoyao from comment #29) > > For 15 r15-7525 is intended for this issue. But I don't know if it's a good > > idea to backport it, as it's only a workaround, not a proper fix. > > > > Could someone try the diff in PR 115842 comment 6 (one time just on the > > trunk, another with r15-7525 reverted)? > > I have tested on r15-8080, and the results are as follows: > > -march=la664 -mtune=la464 -Ofast -flto: 13.4 > -march=la664 -mtune=la464 -Ofast -flto -maddr-reg-reg-cost=1: 13.3 > -march=la664 -mtune=la464 -Ofast -flto + PR 115842 comment 6: 13.5 > -march=la664 -mtune=la464 -Ofast -flto -maddr-reg-reg-cost=1 + PR 115842 > comment 6: 13.3 I add one more test result on gcc15 snapshot 20250105: -march=la464 -O3 -flto + PR 115842 comment 6: 9.84 -march=la464 -O3 -flto: 9.90 (shown in comment 31) In summary right now there seem three possible approaches to fix 548.exchange2_r regression. If applying only one of them, the test results indicate: 1. unknown patch committed between 20250105-20250112 on gcc15: works for gcc15, possibly also works for gcc14? If yes, can it be backported to gcc14? 2. increasing addr-reg-reg-cost (commit r15-7525, set addr-reg-reg-cost to 3): works for gcc14 and should work for gcc15, but looks more like a workaround. 3. PR 115842 comment 6: not working for both gcc14 and gcc15.