diff options
author | Noah Goldstein <goldstein.w.n@gmail.com> | 2023-01-31 23:23:18 -0600 |
---|---|---|
committer | Noah Goldstein <goldstein.w.n@gmail.com> | 2023-02-01 01:26:06 -0600 |
commit | a2f45348d4ea93434d166ab9c6f73a28dba18595 (patch) | |
tree | 6fec10e9804b658b2df3424f34b29eae84e4d344 /llvm/lib/CodeGen/BranchFolding.cpp | |
parent | e1af75572d3a0789cf91bf06869cec69a2741b85 (diff) | |
download | llvm-a2f45348d4ea93434d166ab9c6f73a28dba18595.zip llvm-a2f45348d4ea93434d166ab9c6f73a28dba18595.tar.gz llvm-a2f45348d4ea93434d166ab9c6f73a28dba18595.tar.bz2 |
Transform slow LEA_B_I_D/LEA_SLOWBASE_I -> LEA_IS_D/LEA_IS iff base == index
The two 3c LEA cases:
lea D(base, index,1) -> lea D(,index,2)
lea D(r13/rbp, index) -> lea D(,r13/rbp,2) // D maybe zero
Current take 2 instructions to transform. We can do a bit better by
using LEA w.o a base if base == index and scale == 1.
Reviewed By: pengfei
Differential Revision: https://reviews.llvm.org/D141980
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
0 files changed, 0 insertions, 0 deletions