From fd414a27fdc85e45af00ed4329cb0e6508470dea Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 9 May 2005 04:28:51 +0000 Subject: Don't use the load/store instruction as the source pointer, use the pointer being stored/loaded through! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21806 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp') diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 7595e84f02..c89f16a6e9 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -624,7 +624,7 @@ void SelectionDAGLowering::visitLoad(LoadInst &I) { } SDOperand L = DAG.getLoad(TLI.getValueType(I.getType()), Root, Ptr, - DAG.getSrcValue(&I)); + DAG.getSrcValue(I.getOperand(0))); setValue(&I, L); if (I.isVolatile()) @@ -640,7 +640,7 @@ void SelectionDAGLowering::visitStore(StoreInst &I) { SDOperand Ptr = getValue(I.getOperand(1)); // DAG.setRoot(DAG.getNode(ISD::STORE, MVT::Other, getRoot(), Src, Ptr)); DAG.setRoot(DAG.getNode(ISD::STORE, MVT::Other, getRoot(), Src, Ptr, - DAG.getSrcValue(&I))); + DAG.getSrcValue(I.getOperand(1)))); } void SelectionDAGLowering::visitCall(CallInst &I) { -- cgit v1.2.3-18-g5258