[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:
parent
4ed47342ff
commit
3efdffcb27
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue