diff options
author | Dale Johannesen <dalej@apple.com> | 2008-09-04 00:47:13 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-09-04 00:47:13 +0000 |
commit | 7794f2a3a7778bdbc9bdd861db1fe914450e0470 (patch) | |
tree | 7e62bb84c50ffae40c064783557877066321ca40 /lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
parent | 104e4ce1629ea84736691bd1ee7867bdf90e8a2e (diff) |
Add intrinsics for log, log2, log10, exp, exp2.
No functional change (and no FE change to generate them).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 70bf549dcc..e962368a0f 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/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(), |