[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp SelectionDAGISel.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun May 8 21:29:07 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAG.cpp updated: 1.100 -> 1.101
SelectionDAGISel.cpp updated: 1.48 -> 1.49
---
Log message:
Don't use the load/store instruction as the source pointer, use the pointer
being stored/loaded through!
---
Diffs of the changes: (+4 -2)
SelectionDAG.cpp | 2 ++
SelectionDAGISel.cpp | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.100 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.101
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.100 Sun May 8 23:14:13 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sun May 8 23:28:51 2005
@@ -1329,6 +1329,8 @@
}
SDOperand SelectionDAG::getSrcValue(const Value *V, int Offset) {
+ assert((!V || isa<PointerType>(V->getType())) &&
+ "SrcValue is not a pointer?");
SDNode *&N = ValueNodes[std::make_pair(V, Offset)];
if (N) return SDOperand(N, 0);
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.48 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.49
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.48 Sun May 8 23:08:33 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sun May 8 23:28:51 2005
@@ -624,7 +624,7 @@
}
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 @@
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) {
More information about the llvm-commits
mailing list