commit | 0b0cd9113af42c422c829563c3b12e6e52bd2d79 | [log] [tgz] |
---|---|---|
author | Evan Cheng <evan.cheng@apple.com> | Sat Mar 28 05:57:29 2009 +0000 |
committer | Evan Cheng <evan.cheng@apple.com> | Sat Mar 28 05:57:29 2009 +0000 |
tree | 9b3c7aba0c5687a35d4f494df6b4bc6de48f3f71 | |
parent | e8b64106ecf1057c7506d44ec8f64b5c83ee51c7 [diff] |
Optimize some 64-bit multiplication by constants into two lea's or one lea + shl since imulq is slow (latency 5). e.g. x * 40 => shlq $3, %rdi leaq (%rdi,%rdi,4), %rax This has the added benefit of allowing more multiply to be folded into addressing mode. e.g. a * 24 + b => leaq (%rdi,%rdi,2), %rax leaq (%rsi,%rax,8), %rax git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67917 91177308-0d34-0410-b5e6-96231b3b80d8