From da2d80688b68fd1667b74efc9f008b33c347c2a3 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Thu, 4 Sep 2008 00:47:13 +0000 Subject: Add intrinsics for log, log2, log10, exp, exp2. No functional change (and no FE change to generate them). llvm-svn: 55753 --- .../lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 70bf549dcc7..e962368a0fd 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -3015,6 +3015,31 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) { getValue(I.getOperand(1)).getValueType(), getValue(I.getOperand(1)))); return 0; + case Intrinsic::log: + setValue(&I, DAG.getNode(ISD::FLOG, + getValue(I.getOperand(1)).getValueType(), + getValue(I.getOperand(1)))); + return 0; + case Intrinsic::log2: + setValue(&I, DAG.getNode(ISD::FLOG2, + getValue(I.getOperand(1)).getValueType(), + getValue(I.getOperand(1)))); + return 0; + case Intrinsic::log10: + setValue(&I, DAG.getNode(ISD::FLOG10, + getValue(I.getOperand(1)).getValueType(), + getValue(I.getOperand(1)))); + return 0; + case Intrinsic::exp: + setValue(&I, DAG.getNode(ISD::FEXP, + getValue(I.getOperand(1)).getValueType(), + getValue(I.getOperand(1)))); + return 0; + case Intrinsic::exp2: + setValue(&I, DAG.getNode(ISD::FEXP2, + getValue(I.getOperand(1)).getValueType(), + getValue(I.getOperand(1)))); + return 0; case Intrinsic::pow: setValue(&I, DAG.getNode(ISD::FPOW, getValue(I.getOperand(1)).getValueType(), -- cgit v1.2.3