HomePhabricator

[TargetLowering] Add buildLegalVectorShuffle facility to help build legal…

Description

[TargetLowering] Add buildLegalVectorShuffle facility to help build legal shuffles

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.

Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri

Subscribers: javed.absar, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66804