Page MenuHomePhabricator

[X86] Call SimplifyDemandedBits on conditions of X86ISD::SHRUNKBLEND
ClosedPublic

Authored by craig.topper on Mon, Jan 7, 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

Repository
rL LLVM

Event Timeline

RKSimon added inline comments.Tue, Jan 8, 2:48 AM
lib/Target/X86/X86ISelLowering.cpp
34318 ↗(On Diff #180588)

Would it be any better to add X86ISD::SHRUNKBLEND handling to X86TargetLowering::SimplifyDemandedBitsForTargetNode directly?

Also, should we remove the similar SimplifyDemandedBits call in combineVSelectToShrunkBlend?

Also, should we remove the similar SimplifyDemandedBits call in combineVSelectToShrunkBlend?

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.

Reuse combineVSelectToShrunkBlend. This reduces the code and should allow better optimization when the select condition is used by multiple selects.

RKSimon accepted this revision.Thu, Jan 10, 1:20 AM

LGTM - thanks

This revision is now accepted and ready to land.Thu, Jan 10, 1:20 AM
This revision was automatically updated to reflect the committed changes.