mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
Revert rL344933 from llvm/trunk: [X86][SSE] Tidyup DecodeVPERMILPMask shuffle mask decoding
We can't safely assume that certain RawMask entries are UNDEF as most variable shuffles ignore non-index bits. ........ Add support for UNDEF raw mask elements and remove the ConstantPool DecodeVPERMILPMask usage in X86ISelLowering.cpp llvm-svn: 344936
This commit is contained in:
parent
f8047f57bb
commit
ee8a57df9e
@ -501,10 +501,6 @@ void DecodeVPERMILPMask(unsigned NumElts, unsigned ScalarBits,
|
||||
|
||||
for (unsigned i = 0, e = RawMask.size(); i < e; ++i) {
|
||||
uint64_t M = RawMask[i];
|
||||
if (M == (uint64_t)SM_SentinelUndef) {
|
||||
ShuffleMask.push_back(M);
|
||||
continue;
|
||||
}
|
||||
M = (ScalarBits == 64 ? ((M >> 1) & 0x1) : (M & 0x3));
|
||||
unsigned LaneOffset = i & ~(NumEltsPerLane - 1);
|
||||
ShuffleMask.push_back((int)(LaneOffset + M));
|
||||
|
@ -6043,10 +6043,14 @@ static bool getTargetShuffleMask(SDNode *N, MVT VT, bool AllowSentinelZero,
|
||||
IsUnary = true;
|
||||
SDValue MaskNode = N->getOperand(1);
|
||||
SmallVector<uint64_t, 32> RawMask;
|
||||
if (getTargetShuffleMaskIndices(MaskNode, MaskEltSize, RawMask, true)) {
|
||||
if (getTargetShuffleMaskIndices(MaskNode, MaskEltSize, RawMask)) {
|
||||
DecodeVPERMILPMask(NumElems, MaskEltSize, RawMask, Mask);
|
||||
break;
|
||||
}
|
||||
if (auto *C = getTargetConstantFromNode(MaskNode)) {
|
||||
DecodeVPERMILPMask(C, MaskEltSize, Mask);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
case X86ISD::PSHUFB: {
|
||||
|
Loading…
Reference in New Issue
Block a user