[PATCH] D23000: [X86] Improve 64-bit shifts on 32-bit targets (PR14593)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 31 12:49:14 PDT 2016
eli.friedman added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:28679
@@ +28678,3 @@
+ }
+ // Test for ADD( Y, Y ) as an equivalent to SHL( Y, 1 ).
+ if (InnerShift == ISD::SHL && Op1.getOpcode() == ISD::ADD &&
----------------
RKSimon wrote:
> eli.friedman wrote:
> > If DAGCombine doesn't transform Y+Y to Y<<1, it should. (instcombine definitely does this.) Not really important for now, though.
> In the old codegen we were seeing code like 'leal (%edx,%edx), %eax' being lowered from shl( v, 1 ) IR.
There's a pattern in X86InstrCompiler.td which does a shift->add transform because it's more efficient on x86... but we want to keep the SelectionDAG in canonical form as long as possible.
Repository:
rL LLVM
https://reviews.llvm.org/D23000
More information about the llvm-commits
mailing list