summaryrefslogtreecommitdiffstats
path: root/llvm/test/Assembler/half-conv.ll
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2012-05-24 15:59:06 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2012-05-24 15:59:06 +0000
commit6b31d170a44482c231abd9306e5687a88ae673ad (patch)
tree1898e2e56ebd54139ee1f3549875fd89e99dfccb /llvm/test/Assembler/half-conv.ll
parentd1b9521e483b521d3f863ab89018879b48333bd5 (diff)
downloadbcm5719-llvm-6b31d170a44482c231abd9306e5687a88ae673ad.tar.gz
bcm5719-llvm-6b31d170a44482c231abd9306e5687a88ae673ad.zip
Add half support to LLVM (for OpenCL)
Submitted by: Anton Lokhmotov <Anton.Lokhmotov@arm.com> Approved by: o Anton Korobeynikov o Micah Villmow o David Neto llvm-svn: 157393
Diffstat (limited to 'llvm/test/Assembler/half-conv.ll')
-rw-r--r--llvm/test/Assembler/half-conv.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Assembler/half-conv.ll b/llvm/test/Assembler/half-conv.ll
new file mode 100644
index 00000000000..bf9ae571397
--- /dev/null
+++ b/llvm/test/Assembler/half-conv.ll
@@ -0,0 +1,13 @@
+; RUN: llvm-as < %s | opt -O3 | llvm-dis | FileCheck %s
+; Testing half to float conversion.
+
+define float @abc() nounwind {
+entry:
+ %a = alloca half, align 2
+ %.compoundliteral = alloca float, align 4
+ store half 0xH4C8D, half* %a, align 2
+ %tmp = load half* %a, align 2
+ %conv = fpext half %tmp to float
+; CHECK: 0x4032340000000000
+ ret float %conv
+}
OpenPOWER on IntegriCloud