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 | da2d80688b68fd1667b74efc9f008b33c347c2a3 (patch) | |
tree | 3a486fffb3ceb5b9182f365874a63b755ea4258f /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
parent | 3cbb3b2920e6bb3ba7eac44c1f2165b022616ffe (diff) | |
download | bcm5719-llvm-da2d80688b68fd1667b74efc9f008b33c347c2a3.tar.gz bcm5719-llvm-da2d80688b68fd1667b74efc9f008b33c347c2a3.zip |
Add intrinsics for log, log2, log10, exp, exp2.
No functional change (and no FE change to generate them).
llvm-svn: 55753
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
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(), |