-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
…ffle getFauxShuffleMask can't handle ISD::TRUNCATE itself as it can't handle inputs that are larger than the output Another step towards removing combineX86ShuffleChainWithExtract
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40287,6 +40287,16 @@ static SDValue combineX86ShufflesRecursively( | |
OpMask.assign(NumElts, SM_SentinelUndef); | ||
std::iota(OpMask.begin(), OpMask.end(), ExtractIdx); | ||
OpZero = OpUndef = APInt::getNullValue(NumElts); | ||
} else if (Op.getOpcode() == ISD::TRUNCATE && | ||
(RootSizeInBits % Op.getOperand(0).getValueSizeInBits()) == 0) { | ||
SDValue SrcVec = Op.getOperand(0); | ||
unsigned Scale = SrcVec.getValueSizeInBits() / VT.getSizeInBits(); | ||
unsigned NumElts = VT.getVectorNumElements(); | ||
OpInputs.assign({SrcVec}); | ||
OpMask.assign(Scale * NumElts, SM_SentinelUndef); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
RKSimon
Author
Collaborator
|
||
OpZero = OpUndef = APInt::getNullValue(Scale * NumElts); | ||
for (unsigned I = 0; I != NumElts; ++I) | ||
OpMask[I] = I * Scale; | ||
} else { | ||
return SDValue(); | ||
} | ||
|
Will this get extended to double the size by line 40321 below? Seeing some really bizarre miscompiles with this change.