Include a frame index in the "fixed stack" pseudo source value
instead of using the frame index for the SVOffset, which was
inconsistent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53486 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index 5dd0116..213b944 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -1134,7 +1134,7 @@
   if (Flags.isByVal())
     return FIN;
   return DAG.getLoad(VA.getValVT(), Root, FIN,
-                     PseudoSourceValue::getFixedStack(), FI);
+                     PseudoSourceValue::getFixedStack(FI), 0);
 }
 
 SDOperand
@@ -1320,8 +1320,7 @@
         SDOperand Val = DAG.getCopyFromReg(Root, VReg, MVT::i64);
         SDOperand Store =
           DAG.getStore(Val.getValue(1), Val, FIN,
-                       PseudoSourceValue::getFixedStack(),
-                       RegSaveFrameIndex);
+                       PseudoSourceValue::getFixedStack(RegSaveFrameIndex), 0);
         MemOps.push_back(Store);
         FIN = DAG.getNode(ISD::ADD, getPointerTy(), FIN,
                           DAG.getIntPtrConstant(8));
@@ -1336,8 +1335,7 @@
         SDOperand Val = DAG.getCopyFromReg(Root, VReg, MVT::v4f32);
         SDOperand Store =
           DAG.getStore(Val.getValue(1), Val, FIN,
-                       PseudoSourceValue::getFixedStack(),
-                       RegSaveFrameIndex);
+                       PseudoSourceValue::getFixedStack(RegSaveFrameIndex), 0);
         MemOps.push_back(Store);
         FIN = DAG.getNode(ISD::ADD, getPointerTy(), FIN,
                           DAG.getIntPtrConstant(16));
@@ -1435,7 +1433,7 @@
   MVT VT = Is64Bit ? MVT::i64 : MVT::i32;
   SDOperand NewRetAddrFrIdx = DAG.getFrameIndex(NewReturnAddrFI, VT);
   Chain = DAG.getStore(Chain, RetAddrFrIdx, NewRetAddrFrIdx, 
-                       PseudoSourceValue::getFixedStack(), NewReturnAddrFI);
+                       PseudoSourceValue::getFixedStack(NewReturnAddrFI), 0);
   return Chain;
 }
 
@@ -1652,7 +1650,7 @@
           // Store relative to framepointer.
           MemOpChains2.push_back(
             DAG.getStore(Chain, Arg, FIN,
-                         PseudoSourceValue::getFixedStack(), FI));
+                         PseudoSourceValue::getFixedStack(FI), 0));
         }            
       }
     }
@@ -4403,8 +4401,7 @@
   SDOperand StackSlot = DAG.getFrameIndex(SSFI, getPointerTy());
   SDOperand Chain = DAG.getStore(DAG.getEntryNode(), Op.getOperand(0),
                                  StackSlot,
-                                 PseudoSourceValue::getFixedStack(),
-                                 SSFI);
+                                 PseudoSourceValue::getFixedStack(SSFI), 0);
 
   // Build the FILD
   SDVTList Tys;
@@ -4439,7 +4436,7 @@
     Ops.push_back(InFlag);
     Chain = DAG.getNode(X86ISD::FST, Tys, &Ops[0], Ops.size());
     Result = DAG.getLoad(Op.getValueType(), Chain, StackSlot,
-                         PseudoSourceValue::getFixedStack(), SSFI);
+                         PseudoSourceValue::getFixedStack(SSFI), 0);
   }
 
   return Result;
@@ -4479,7 +4476,7 @@
   if (isScalarFPTypeInSSEReg(Op.getOperand(0).getValueType())) {
     assert(Op.getValueType() == MVT::i64 && "Invalid FP_TO_SINT to lower!");
     Chain = DAG.getStore(Chain, Value, StackSlot,
-                         PseudoSourceValue::getFixedStack(), SSFI);
+                         PseudoSourceValue::getFixedStack(SSFI), 0);
     SDVTList Tys = DAG.getVTList(Op.getOperand(0).getValueType(), MVT::Other);
     SDOperand Ops[] = {
       Chain, StackSlot, DAG.getValueType(Op.getOperand(0).getValueType())