diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2012-05-24 15:59:06 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2012-05-24 15:59:06 +0000 |
commit | 057beb8d4fe8d5dad98ad80a49a649730c3a3eb0 (patch) | |
tree | 48e33d7c92b9abb8e79b152d07fef085fcc9b061 /test/Assembler/half-constprop.ll | |
parent | 91bf23e6b7b9b4a00ebc73d4136a3b985581002a (diff) | |
download | llvm-057beb8d4fe8d5dad98ad80a49a649730c3a3eb0.tar.gz llvm-057beb8d4fe8d5dad98ad80a49a649730c3a3eb0.tar.bz2 llvm-057beb8d4fe8d5dad98ad80a49a649730c3a3eb0.tar.xz |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Assembler/half-constprop.ll')
-rw-r--r-- | test/Assembler/half-constprop.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Assembler/half-constprop.ll b/test/Assembler/half-constprop.ll new file mode 100644 index 0000000000..03ccdda97e --- /dev/null +++ b/test/Assembler/half-constprop.ll @@ -0,0 +1,17 @@ +; RUN: llvm-as < %s | opt -O3 | llvm-dis | FileCheck %s +; Testing half constant propagation. + +define half @abc() nounwind { +entry: + %a = alloca half, align 2 + %b = alloca half, align 2 + %.compoundliteral = alloca float, align 4 + store half 0xH4200, half* %a, align 2 + store half 0xH4B9A, half* %b, align 2 + %tmp = load half* %a, align 2 + %tmp1 = load half* %b, align 2 + %add = fadd half %tmp, %tmp1 +; CHECK: 0xH4C8D + ret half %add +} + |