This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Add demanded elts variants to isConstSplat helpers. NFCI.
ClosedPublic

Authored by RKSimon on Feb 21 2019, 5:45 AM.

Details

Summary

These helpers extend the existing isConstOrConstSplat helper checks to support DemandedElts masks as well.

We already had a local version of this in SelectionDAG that computeKnownBits/ComputeNumSignBits made use of, but this adds the functionality directly to the BuildVectorSDNode node and extends the isConstOrConstSplat to use that.

This will allow us to reuse the functionality in SimplifyDemandedVectorElts/SimplifyDemandedBits.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Feb 21 2019, 5:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2019, 5:45 AM
Herald added a subscriber: jdoerfert. · View Herald Transcript
niravd accepted this revision.Feb 25 2019, 7:48 AM

LGTM.

This revision is now accepted and ready to land.Feb 25 2019, 7:48 AM
This revision was automatically updated to reflect the committed changes.