If we're only demanding the (shifted) sign bits of the shift source value, then we can use the value directly.
This handles SimplifyDemandedBits/SimplifyMultipleUseDemandedBits for both ISD::SHL and X86ISD::VSHLI.
Paths
| Differential D80869
[DAG] SimplifyDemandedBits - peek through SHL if we only demand sign bits. ClosedPublic Authored by RKSimon on May 30 2020, 7:39 AM.
Details Summary If we're only demanding the (shifted) sign bits of the shift source value, then we can use the value directly. This handles SimplifyDemandedBits/SimplifyMultipleUseDemandedBits for both ISD::SHL and X86ISD::VSHLI.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Jun 2 2020, 3:43 PM Closed by commit rGea80b4066945: [DAG] SimplifyDemandedBits - peek through SHL if we only demand sign bits. (authored by RKSimon). · Explain WhyJun 3 2020, 8:15 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 267458 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/AMDGPU/sdiv.ll
llvm/test/CodeGen/X86/bitcast-setcc-128.ll
llvm/test/CodeGen/X86/funnel-shift.ll
llvm/test/CodeGen/X86/promote-cmp.ll
llvm/test/CodeGen/X86/sdiv_fix_sat.ll
llvm/test/CodeGen/X86/vector-mulfix-legalize.ll
llvm/test/CodeGen/X86/vector-reduce-and-bool.ll
llvm/test/CodeGen/X86/vector-reduce-or-bool.ll
|