aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-08-04 23:09:15 +0000
committerDan Gohman <gohman@apple.com>2008-08-04 23:09:15 +0000
commitd0859943ac16389fb843f1357746aade3cd07a6f (patch)
tree72c9ae9eec66ba1cf4259c404b4fa092c84b8d0b
parentf7f3b50cd8c10c20f68045c5322f134bd83b06c7 (diff)
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
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index 7870cb0c16..da1bd93295 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -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;