From: Evan Cheng Date: Thu, 22 Mar 2012 19:29:09 +0000 (+0000) Subject: Assign node orders to target intrinsics which do not produce results. rdar://11096639 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5aef7957ddf43d30c33137386fdd9cbfcc5944e4;p=oota-llvm.git Assign node orders to target intrinsics which do not produce results. rdar://11096639 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153269 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 2ac9655dd05..6ec38c57b18 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -3586,6 +3586,12 @@ void SelectionDAGBuilder::visitTargetIntrinsic(const CallInst &I, } setValue(&I, Result); + } else { + // Assign order to result here. If the intrinsic does not produce a result, + // it won't be mapped to a SDNode and visit() will not assign it an order + // number. + ++SDNodeOrder; + AssignOrderingToNode(Result.getNode()); } }