forked from OSchip/llvm-project
[X86] isTargetShuffleEquivalent - assert the expected mask is correctly formed. NFCI.
While we don't make any assumptions about the actual mask, assert that the expected mask only contains valid mask element values. llvm-svn: 366066
This commit is contained in:
parent
12400b9783
commit
60fb5e97a0
|
@ -10001,6 +10001,8 @@ static bool isTargetShuffleEquivalent(ArrayRef<int> Mask,
|
|||
int Size = Mask.size();
|
||||
if (Size != (int)ExpectedMask.size())
|
||||
return false;
|
||||
assert(isUndefOrZeroOrInRange(ExpectedMask, 0, 2 * Size) &&
|
||||
"Illegal target shuffle mask");
|
||||
|
||||
for (int i = 0; i < Size; ++i)
|
||||
if (Mask[i] == SM_SentinelUndef)
|
||||
|
|
Loading…
Reference in New Issue