Skip to content

Commit 6a0e632

Browse files
committed
[X86] getFauxShuffleMask - only handle VTRUNC nodes with matching src/dst sizes
Cleanup work for llvm#133947 - we need to handle VTRUNC nodes with large source vectors directly to allow us to widen the size of the shuffle combine We currently discard these results in combineX86ShufflesRecursively anyhow as we don't allow inputs from getTargetShuffleInputs to be larger than the shuffle value type
1 parent 81601cf commit 6a0e632

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6413,9 +6413,7 @@ static bool getFauxShuffleMask(SDValue N, const APInt &DemandedElts,
64136413
case X86ISD::VTRUNC: {
64146414
SDValue Src = N.getOperand(0);
64156415
EVT SrcVT = Src.getValueType();
6416-
// Truncated source must be a simple vector.
6417-
if (!SrcVT.isSimple() || (SrcVT.getSizeInBits() % 128) != 0 ||
6418-
(SrcVT.getScalarSizeInBits() % 8) != 0)
6416+
if (SrcVT.getSizeInBits() != NumSizeInBits)
64196417
return false;
64206418
unsigned NumSrcElts = SrcVT.getVectorNumElements();
64216419
unsigned NumBitsPerSrcElt = SrcVT.getScalarSizeInBits();

0 commit comments

Comments
 (0)