This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/83253] -ftree-slsr causes performance regression


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83253

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Perhaps slsr should then if it is considering
Y = B + (i' * S)
X = B + (i * S)
to
Y = B + (i' * S)
X = Y + (i - i') * S
and if i and i' are INTEGER_CSTs call choose_mult_variant on both
i and (i - i') and see which one is more expensive (of course, even before that
with the check that power of 2 multiplication is always faster than anything
else, as expand_mult uses that unconditionally).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]