Page MenuHomePhabricator

[TargetLowering] Add buildLegalVectorShuffle facility to help build legal shuffles
ClosedPublic

Authored by deadalnix on Aug 27 2019, 7:50 AM.

Details

Summary

There are at least 2 ways to express the same shuffle. Various pieces of code explicit check for both option, but other places do not when they would benefit from doing it. This patches refactor the codebase to use buildLegalVectorShuffle in order to make that behavior more consistent.

Diff Detail

Repository
rL LLVM

Event Timeline

deadalnix created this revision.Aug 27 2019, 7:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2019, 7:50 AM
lebedev.ri accepted this revision.Aug 27 2019, 4:12 PM

Looks good to me, but maybe wait for one more review.

This revision is now accepted and ready to land.Aug 27 2019, 4:12 PM
RKSimon accepted this revision.Aug 28 2019, 3:43 AM

LGTM

include/llvm/CodeGen/TargetLowering.h
3196 ↗(On Diff #217407)

Make it clear that Mask may be altered whether this function succeeds or fails.

deadalnix updated this revision to Diff 217606.Aug 28 2019, 4:54 AM

Upadte the doc comment to make it clear that the Mask argument can be modified.

This revision was automatically updated to reflect the committed changes.