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 | 10d7fa62fffbceed580c34a00bd30f16643f6607 (patch) | |
tree | d84ad92562e643f42932cbfb3b8cdb1082b921de | |
parent | 8400ed3fc50cced00e137cf27ed27c6941c3cb83 (diff) |
Allow targets to custom lower their own intrinsics if desired.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27146 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 6acadc1349..81139dcde1 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/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; } |