https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70341
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[4.9/5/6/7 Regression] Code |[4.9/5/6/7 Regression] cost |size increase due to |model for addresses is |earlier switch case |incorrect, slsr is using |lowering. |reg + reg + CST for arm --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I am suspecting what is happening on arm is the cost model for addresses is incorrect and allowing [r1 + r2 + const] so slsr is picking that. This is why it works correctly on aarch64 because the cost model is correct and rejects that mode.