Add an assert to catch invalid VECTOR_SHUFFLE mask indices.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54329 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-08-04 23:09:15 +00:00
parent f7f3b50cd8
commit d0859943ac

View File

@ -3665,6 +3665,7 @@ LowerVECTOR_SHUFFLE_4wide(SDValue V1, SDValue V2,
Locs[i] = std::make_pair(-1, -1);
} else {
unsigned Val = cast<ConstantSDNode>(Elt)->getValue();
assert(Val < 8 && "Invalid VECTOR_SHUFFLE index!");
if (Val < 4) {
Locs[i] = std::make_pair(0, NumLo);
Mask1[NumLo] = Elt;