Fold (shift (shift X, C2), C1) -> (shift X, (C1 + C2)) for logical as
well as arithmetic shifts. This is needed to prevent regressions from
an upcoming funnel shift expansion change.
While we're here, fold (VSRAI -1, C) -> -1 too.
Paths
| Differential D77300
[X86] Improve combineVectorShiftImm ClosedPublic Authored by foad on Apr 2 2020, 5:45 AM.
Details
Summary Fold (shift (shift X, C2), C1) -> (shift X, (C1 + C2)) for logical as While we're here, fold (VSRAI -1, C) -> -1 too.
Diff Detail
Unit TestsFailed
Event Timelinefoad added a child revision: D77301: [TargetLowering] Improve expansion of FSHL/FSHR.Apr 2 2020, 5:47 AM
This revision is now accepted and ready to land.Apr 3 2020, 2:58 AM Closed by commit rGbc78baec4cc3: [X86] Improve combineVectorShiftImm (authored by foad). · Explain WhyApr 13 2020, 8:34 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 254546 llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/midpoint-int-vec-128.ll
llvm/test/CodeGen/X86/midpoint-int-vec-256.ll
llvm/test/CodeGen/X86/midpoint-int-vec-512.ll
|
ISD::isBuildVectorAll* leaves UNDEFs in there - we must generate the constant