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 target/83253] -ftree-slsr causes performance regression


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

--- Comment #15 from mikulas at artax dot karlin.mff.cuni.cz ---
> Well, in theory multiplication by 3 isn't that expensive on i?86/x86_64,
> because lea can do that. But multiplication by 4 should be still cheaper or as
> cheap as, because if we do * 3 by lea, we can do * 4 by lea too

Multiplication by 4 can be combined for free with another addition (i.e. lea
eax, [ebx + ecx * 4] and multiplication by 3 can't. So, multilication by 4
should have lower cost than multiplication by 3, even if both result in just
one instruction.

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