aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael Liao <michael.liao@intel.com>2012-08-20 17:59:18 +0000
committerMichael Liao <michael.liao@intel.com>2012-08-20 17:59:18 +0000
commit24438b83595dd243e4562912750ef15438787a42 (patch)
tree95260fb177c730b6c13e83a72219b95fc2f77870 /lib
parentb862f094b78e3176813903f63c0e78b6e0e7852b (diff)
downloadexternal_llvm-24438b83595dd243e4562912750ef15438787a42.zip
external_llvm-24438b83595dd243e4562912750ef15438787a42.tar.gz
external_llvm-24438b83595dd243e4562912750ef15438787a42.tar.bz2
fix a case where all operands of BUILD_VECTOR are undefined
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162214 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index e4af736..1bbd4a7 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -5180,6 +5180,10 @@ X86TargetLowering::LowerVectorFpExtend(SDValue &Op, SelectionDAG &DAG) const {
Mask.push_back(cast<ConstantSDNode>(L2In.getOperand(1))->getZExtValue());
}
+ // Quit if all operands of BUILD_VECTOR are undefined.
+ if (!VecIn.getNode())
+ return SDValue();
+
// Fill the remaining mask as undef.
for (unsigned i = NumElts; i < VecInVT.getVectorNumElements(); ++i)
Mask.push_back(-1);