[X86][SSE] Tidyup matchVectorShuffleWithUNPCK helper function call.

Don't bother setting the V1/V2 operands again for unary shuffles.

Don't bother legalizing the value type unless the match succeeds.

llvm-svn: 295051
This commit is contained in:
Simon Pilgrim 2017-02-14 12:54:39 +00:00
parent 4ed47342ff
commit 3efdffcb27
1 changed files with 3 additions and 7 deletions

View File

@ -26608,15 +26608,11 @@ static bool matchBinaryVectorShuffle(MVT MaskVT, ArrayRef<int> Mask,
(MaskVT.is256BitVector() && 32 <= EltSizeInBits && Subtarget.hasAVX()) ||
(MaskVT.is256BitVector() && Subtarget.hasAVX2()) ||
(MaskVT.is512BitVector() && Subtarget.hasAVX512())) {
MVT LegalVT = MaskVT;
if (LegalVT.is256BitVector() && !Subtarget.hasAVX2())
LegalVT = (32 == EltSizeInBits ? MVT::v8f32 : MVT::v4f64);
if (matchVectorShuffleWithUNPCK(MaskVT, V1, IsUnary ? V1 : V2, Shuffle,
IsUnary, Mask)) {
if (IsUnary)
V2 = V1;
ShuffleVT = LegalVT;
ShuffleVT = MaskVT;
if (ShuffleVT.is256BitVector() && !Subtarget.hasAVX2())
ShuffleVT = (32 == EltSizeInBits ? MVT::v8f32 : MVT::v4f64);
return true;
}
}