aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-08-21 22:36:36 +0000
committerBill Wendling <isanbard@gmail.com>2008-08-21 22:36:36 +0000
commitae0218c914331510e2d7e3cda4d33d0457e2552d (patch)
tree7e64f92e3915048036569bd87e1ac8acf8149eb3
parente85dc49e13265af1b41a14e6359537e14d8f9ecb (diff)
If part of the mask is "undef", then ignore it as we don't care what goes into it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55147 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index 3b3e2a1ae3..5d8cb1cd29 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -3479,6 +3479,8 @@ SDValue LowerVECTOR_SHUFFLEv8i16(SDValue V1, SDValue V2,
if (InOrder[i])
continue;
SDValue Elt = MaskElts[i];
+ if (Elt.getOpcode() == ISD::UNDEF)
+ continue;
unsigned EltIdx = cast<ConstantSDNode>(Elt)->getValue();
SDValue ExtOp = (EltIdx < 8)
? DAG.getNode(ISD::EXTRACT_VECTOR_ELT, MVT::i16, V1,