Pass the correct value for the chain to the store
authorNate Begeman <natebegeman@mac.com>
Sun, 3 Apr 2005 22:22:56 +0000 (22:22 +0000)
committerNate Begeman <natebegeman@mac.com>
Sun, 3 Apr 2005 22:22:56 +0000 (22:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21066 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCISelPattern.cpp

index 6c6ad337b949bf8a190e38bed7fb5e3e01a8fbc7..6d79c9c7a44525ccc0ee119c8ca2cf65c247aec4 100644 (file)
@@ -198,9 +198,8 @@ PPC32TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
     // that they may be loaded by dereferencing va_next
     SDOperand FIN = DAG.getFrameIndex(VarArgsFrameIndex, MVT::i32);
     SDOperand Val = DAG.getCopyFromReg(PPC::R4, MVT::i32, DAG.getRoot());
-    SDOperand Store = DAG.getNode(ISD::STORE, MVT::Other, Val, Val, FIN);
-    DAG.setRoot(Val.getValue(1));
-    ArgValues.push_back(Store);
+    SDOperand Store = DAG.getNode(ISD::STORE, MVT::Other, Val.getValue(1), Val, FIN);
+    DAG.setRoot(Store);
   }
 
   return ArgValues;