CALLSEQ_START/END nodes don't get memoized, do not add them in when
replaceAllUses'ing.
llvm-svn: 24539
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 8aa2bc6..039cd57 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -387,6 +387,10 @@
///
SDNode *SelectionDAG::AddNonLeafNodeToCSEMaps(SDNode *N) {
assert(N->getNumOperands() && "This is a leaf node!");
+ if (N->getOpcode() == ISD::CALLSEQ_START ||
+ N->getOpcode() == ISD::CALLSEQ_END)
+ return 0;
+
if (N->getOpcode() == ISD::LOAD) {
SDNode *&L = Loads[std::make_pair(N->getOperand(1),
std::make_pair(N->getOperand(0),