aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-28 00:40:33 +0000
committerChris Lattner <sabre@nondot.org>2006-03-28 00:40:33 +0000
commit48b61a729df6576c8833a83893d4086bddff69a5 (patch)
treea1f4b91e21bd23bc03c86b75033befa4bf175b56 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent0038e598037f76c2dce8b55ebb5e9147fd786330 (diff)
Tblgen doesn't like multiple SDNode<> definitions that map to the sameenum value. Split them into separate enums.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index c145008852..d404d15ff7 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -1261,8 +1261,14 @@ void SelectionDAGLowering::visitTargetIntrinsic(CallInst &I,
VTs.push_back(MVT::Other);
// Create the node.
- SDOperand Result = DAG.getNode(ISD::INTRINSIC, VTs, Ops);
-
+ SDOperand Result;
+ if (!HasChain)
+ Result = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, VTs, Ops);
+ else if (I.getType() != Type::VoidTy)
+ Result = DAG.getNode(ISD::INTRINSIC_W_CHAIN, VTs, Ops);
+ else
+ Result = DAG.getNode(ISD::INTRINSIC_VOID, VTs, Ops);
+
if (HasChain)
DAG.setRoot(Result.getValue(Result.Val->getNumValues()-1));
if (I.getType() != Type::VoidTy) {