There can be additional simplifications after VSELECT is converted to SHRUNKBLEND. So we should call SimplifyDemandedBits
This should help some of the regressions from D56387
Paths
| Differential D56421
[X86] Call SimplifyDemandedBits on conditions of X86ISD::SHRUNKBLEND ClosedPublic Authored by craig.topper on Jan 7 2019, 5:00 PM.
Details Summary There can be additional simplifications after VSELECT is converted to SHRUNKBLEND. So we should call SimplifyDemandedBits This should help some of the regressions from D56387
Diff Detail Event Timeline
Comment Actions Also, should we remove the similar SimplifyDemandedBits call in combineVSelectToShrunkBlend? Comment Actions
The one that decides when to turn VSELECT into SHRUNKBLEND? I don't think we can remove that. We might be able to merge this with it and turn SHRUNKBLEND into SHRUNKBLEND again if another simplification is made. That would probably help with cases where the condition is used multiple times. Comment Actions Reuse combineVSelectToShrunkBlend. This reduces the code and should allow better optimization when the select condition is used by multiple selects. This revision is now accepted and ready to land.Jan 10 2019, 1:20 AM Closed by commit rL350875: [X86] Call SimplifyDemandedBits on conditions of X86ISD::SHRUNKBLEND (authored by ctopper). · Explain WhyJan 10 2019, 11:09 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 180930 lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx2-logic.ll
test/CodeGen/X86/vector-reduce-smax.ll
test/CodeGen/X86/vector-reduce-smin.ll
test/CodeGen/X86/vector-reduce-umax.ll
test/CodeGen/X86/vector-reduce-umin.ll
|
Would it be any better to add X86ISD::SHRUNKBLEND handling to X86TargetLowering::SimplifyDemandedBitsForTargetNode directly?