diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 9f03df35570..dc22527cf0c 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -26245,6 +26245,12 @@ bool X86TargetLowering::isShuffleMaskLegal(ArrayRef<int> M, EVT VT) const { bool X86TargetLowering::isVectorClearMaskLegal(const SmallVectorImpl<int> &Mask, EVT VT) const { + // Don't convert an 'and' into a shuffle that we don't directly support. + // vpblendw and vpshufb for 256-bit vectors are not available on AVX1. + if (!Subtarget.hasAVX2()) + if (VT == MVT::v32i8 || VT == MVT::v16i16) + return false; + // Just delegate to the generic legality, clear masks aren't special. return isShuffleMaskLegal(Mask, VT); } |