Don't attempt to create VZEXT_LOAD out of an extload. This an issue where the
[oota-llvm.git] / lib / Target / X86 / X86ISelLowering.cpp
index 2a9cef1223fa374ea3b7d23d5215df7e82f6d3f1..5343971d34b3560798f568c7a1e65992cb874a33 100644 (file)
@@ -6324,6 +6324,11 @@ static SDOperand PerformBuildVectorCombine(SDNode *N, SelectionDAG &DAG,
 
   // Transform it into VZEXT_LOAD addr.
   LoadSDNode *LD = cast<LoadSDNode>(Base);
+  
+  // Load must not be an extload.
+  if (LD->getExtensionType() != ISD::NON_EXTLOAD)
+    return SDOperand();
+  
   return DAG.getNode(X86ISD::VZEXT_LOAD, VT, LD->getChain(), LD->getBasePtr());
 }