diff options
| author | Anton Korobeynikov <asl@math.spbu.ru> | 2010-03-14 18:42:15 +0000 |
|---|---|---|
| committer | Anton Korobeynikov <asl@math.spbu.ru> | 2010-03-14 18:42:15 +0000 |
| commit | 819e9e696f01ab31a92f558848b0a1e7f0b2ff18 (patch) | |
| tree | d00d7df9b4fb5f7c0b89f11b1f4ba92da31bef51 /lib/CodeGen/SelectionDAG | |
| parent | 85c1c0b4023e39452fe763e9cbf48fe63bc72d67 (diff) | |
| download | external_llvm-819e9e696f01ab31a92f558848b0a1e7f0b2ff18.zip external_llvm-819e9e696f01ab31a92f558848b0a1e7f0b2ff18.tar.gz external_llvm-819e9e696f01ab31a92f558848b0a1e7f0b2ff18.tar.bz2 | |
Add DAG nodes to represent FP16 <-> FP32 intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98500 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
| -rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index fc14e90..a034b4c 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -4000,6 +4000,14 @@ SelectionDAGBuilder::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) { case Intrinsic::pow: visitPow(I); return 0; + case Intrinsic::convert_to_fp16: + setValue(&I, DAG.getNode(ISD::FP32_TO_FP16, dl, + MVT::i16, getValue(I.getOperand(1)))); + return 0; + case Intrinsic::convert_from_fp16: + setValue(&I, DAG.getNode(ISD::FP16_TO_FP32, dl, + MVT::f32, getValue(I.getOperand(1)))); + return 0; case Intrinsic::pcmarker: { SDValue Tmp = getValue(I.getOperand(1)); DAG.setRoot(DAG.getNode(ISD::PCMARKER, dl, MVT::Other, getRoot(), Tmp)); |
