If part of the mask is "undef", then ignore it as we don't care what goes into it.

llvm-svn: 55147
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 3b3e2a1..5d8cb1c 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -3479,6 +3479,8 @@
       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,