1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[X86][XOP] Tidied up DecodeVPERMIL2PMask to more closely match DecodeVPERMILPMask.

llvm-svn: 271830
This commit is contained in:
Simon Pilgrim 2016-06-05 14:33:43 +00:00
parent 2249826460
commit 8b04898abe

View File

@ -212,9 +212,11 @@ void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize,
continue;
}
int Index = Selector & 0x3;
Index >>= (ElSize == 64 ? 1 : 0);
Index += (i / NumElementsPerLane) * NumElementsPerLane;
int Index = i & ~(NumElementsPerLane - 1);
if (ElSize == 64)
Index += (Selector >> 1) & 0x1;
else
Index += Selector & 0x3;
int Src = (Selector >> 2) & 0x1;
Index += Src * NumElements;