From: Devang Patel Date: Tue, 26 Oct 2010 22:14:52 +0000 (+0000) Subject: Assign source ordering to nodes created for StoreInst. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7e13efad388f86a4adcb48ec164ee0ba154d0296;p=oota-llvm.git Assign source ordering to nodes created for StoreInst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117404 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index b5597f83d0f..7c875846b63 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -3021,8 +3021,11 @@ void SelectionDAGBuilder::visitStore(const StoreInst &I) { isVolatile, isNonTemporal, Alignment, TBAAInfo); } - DAG.setRoot(DAG.getNode(ISD::TokenFactor, getCurDebugLoc(), - MVT::Other, &Chains[0], NumValues)); + SDValue StoreNode = DAG.getNode(ISD::TokenFactor, getCurDebugLoc(), + MVT::Other, &Chains[0], NumValues); + ++SDNodeOrder; + AssignOrderingToNode(StoreNode.getNode()); + DAG.setRoot(StoreNode); } /// visitTargetIntrinsic - Lower a call of a target intrinsic to an INTRINSIC