Only fixed stack objects and spill slots should be get FixedStack PseudoSourceValue.
[oota-llvm.git] / lib / CodeGen / SelectionDAG / LegalizeVectorTypes.cpp
index 75e12395d8bd037278cf854d3efafa3c2d9834ba..1964f641ca801050f4777a8fc0bdaff98c83c9b5 100644 (file)
@@ -1057,8 +1057,7 @@ SDValue DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT(SDNode *N) {
   EVT EltVT = VecVT.getVectorElementType();
   DebugLoc dl = N->getDebugLoc();
   SDValue StackPtr = DAG.CreateStackTemporary(VecVT);
-  int SPFI = cast<FrameIndexSDNode>(StackPtr.getNode())->getIndex();
-  const Value *SV = PseudoSourceValue::getFixedStack(SPFI);
+  const Value *SV = PseudoSourceValue::getStack();
   SDValue Store = DAG.getStore(DAG.getEntryNode(), dl, Vec, StackPtr, SV, 0);
 
   // Load back the required element.