aboutsummaryrefslogtreecommitdiff
path: root/test/Assembler/half-constprop.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Assembler/half-constprop.ll')
-rw-r--r--test/Assembler/half-constprop.ll17
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 000000000000..03ccdda97e0a
--- /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
+}
+