[X86][SSE] combineX86ShuffleChain add 'CanonicalizeShuffleInput' helper. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 6 Oct 2020 16:32:35 +0000 (17:32 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 6 Oct 2020 16:47:24 +0000 (17:47 +0100)
commit6c7d713cf5d9bb188f1e73452a256386f0288bf7
tree5d062658537b8b5972b8bf7ca6dfe183b99075bf
parentb4264210f2b24b8fb40247f34decd4e14174559e
[X86][SSE] combineX86ShuffleChain add 'CanonicalizeShuffleInput' helper. NFCI.

As part of PR45974, we're getting closer to not creating 'padded' vectors on-the-fly in combineX86ShufflesRecursively, and only pad the source inputs if we have a definite match inside combineX86ShuffleChain.

At the moment combineX86ShuffleChain just has to bitcast an input to the correct shuffle type, but eventually we'll need to pad them as well. So, move the bitcast into a 'CanonicalizeShuffleInput helper for now, making the diff for future padding support a lot smaller.
llvm/lib/Target/X86/X86ISelLowering.cpp