Previously we only formed MUL_IMM when we split a constant. This blocked load folding on those cases. We should also form MUL_IMM for 3/5/9 to favor LEA over load folding.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Paths
| Differential D46040
[X86] Form MUL_IMM for multiplies with 3/5/9 to block load folding. ClosedPublic Authored by craig.topper on Apr 24 2018, 8:51 PM.
Details Summary Previously we only formed MUL_IMM when we split a constant. This blocked load folding on those cases. We should also form MUL_IMM for 3/5/9 to favor LEA over load folding.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Apr 25 2018, 6:31 AM Closed by commit rL330850: [X86] Form MUL_IMM for multiplies with 3/5/9 to encourage LEA formation over… (authored by ctopper). · Explain WhyApr 25 2018, 10:38 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 143962 llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/CodeGen/X86/imul.ll
llvm/trunk/test/CodeGen/X86/mul-constant-i16.ll
llvm/trunk/test/CodeGen/X86/mul-constant-i32.ll
llvm/trunk/test/CodeGen/X86/mul-constant-i64.ll
|