summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2014-07-11 13:33:46 +0000
committerOliver Stannard <oliver.stannard@arm.com>2014-07-11 13:33:46 +0000
commit6eda6ffc0c32f98a2c78a34ca613b519ed5c14c3 (patch)
tree09f665529fc08b2ee8b75c73da1af26eac367048 /llvm/test
parentb666eee1c8df5c431d8340830205744eb80a696d (diff)
downloadbcm5719-llvm-6eda6ffc0c32f98a2c78a34ca613b519ed5c14c3.tar.gz
bcm5719-llvm-6eda6ffc0c32f98a2c78a34ca613b519ed5c14c3.zip
ARM: Allow __fp16 as a function arg or return type for AArch64
ACLE 2.0 allows __fp16 to be used as a function argument or return type. This enables this for AArch64. llvm-svn: 212812
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/AArch64/arm64-aapcs.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/arm64-aapcs.ll b/llvm/test/CodeGen/AArch64/arm64-aapcs.ll
index ccf1371bb5f..127a7cc0a15 100644
--- a/llvm/test/CodeGen/AArch64/arm64-aapcs.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-aapcs.ll
@@ -109,3 +109,17 @@ entry:
; CHECK: ldr {{q[0-9]+}}, [sp]
ret <2 x double> %varg_stack;
}
+
+; Check that f16 can be passed and returned (ACLE 2.0 extension)
+define half @test_half(float, half %arg) {
+; CHECK-LABEL: test_half:
+; CHECK: mov v0.16b, v{{[0-9]+}}.16b
+ ret half %arg;
+}
+
+; Check that f16 constants are materialized correctly
+define half @test_half_const() {
+; CHECK-LABEL: test_half_const:
+; CHECK: ldr h0, [x{{[0-9]+}}, :lo12:{{.*}}]
+ ret half 0xH4248
+}
OpenPOWER on IntegriCloud