diff options
author | Chris Lattner <sabre@nondot.org> | 2006-03-26 09:12:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-03-26 09:12:51 +0000 |
commit | 30ee72586d611a8723b3d37c9ca01367b695ef7f (patch) | |
tree | 26e3498217d829b1f2383999a935320bfe8e5956 /llvm/lib/CodeGen | |
parent | 183e4584898de962e16d5ad6cb1d5017073b8a69 (diff) | |
download | bcm5719-llvm-30ee72586d611a8723b3d37c9ca01367b695ef7f.tar.gz bcm5719-llvm-30ee72586d611a8723b3d37c9ca01367b695ef7f.zip |
Allow targets to custom lower their own intrinsics if desired.
llvm-svn: 27146
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 6acadc1349d..81139dcde17 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -558,6 +558,13 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { for (unsigned i = 0, e = Node->getNumOperands(); i != e; ++i) Ops.push_back(LegalizeOp(Node->getOperand(i))); Result = DAG.UpdateNodeOperands(Result, Ops); + + // Allow the target to custom lower its intrinsics if it wants to. + if (TLI.getOperationAction(ISD::INTRINSIC, MVT::Other) == + TargetLowering::Custom) { + Tmp3 = TLI.LowerOperation(Result, DAG); + if (Tmp3.Val) Result = Tmp3; + } break; } |