https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101523
--- Comment #18 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Hmm, looking at what is done in combine, I wonder why forwprop didn't do the address add into the memory. That would definitely decrease the # of combines being done. Maybe it is because it is used more than once. But still seems like another pass should have done the a=b+c; d=e*[a] into a=b+c; d=e*[b+c] before hand. Maybe there is some address cost going wrong here that forwprop is causing issues. And it just happens combine does not take that into account due to rtl cost not taking address cost into account.