summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AArch64/f16-instructions.ll
diff options
context:
space:
mode:
authorJessica Paquette <jpaquette@apple.com>2019-01-30 23:46:15 +0000
committerJessica Paquette <jpaquette@apple.com>2019-01-30 23:46:15 +0000
commit84bedac7e93ba353798cdce2a8cce91341707d8e (patch)
treedfe98a9fdce9b587663e76139b90de07b8ee2b96 /llvm/test/CodeGen/AArch64/f16-instructions.ll
parent13311e52747d0a4c61e72a4c54d000cf2c26c096 (diff)
downloadbcm5719-llvm-84bedac7e93ba353798cdce2a8cce91341707d8e.tar.gz
bcm5719-llvm-84bedac7e93ba353798cdce2a8cce91341707d8e.zip
[GlobalISel][AArch64] Select G_FEXP
This teaches the legalizer to handle G_FEXP in AArch64. As a result, it also allows us to select G_FEXP. It... - Updates the legalizer-info tests - Adds a test for legalizing exp - Updates the existing fp tests to show that we can now select G_FEXP https://reviews.llvm.org/D57483 llvm-svn: 352692
Diffstat (limited to 'llvm/test/CodeGen/AArch64/f16-instructions.ll')
-rw-r--r--llvm/test/CodeGen/AArch64/f16-instructions.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/f16-instructions.ll b/llvm/test/CodeGen/AArch64/f16-instructions.ll
index ce20ff00e64..67822a304b1 100644
--- a/llvm/test/CodeGen/AArch64/f16-instructions.ll
+++ b/llvm/test/CodeGen/AArch64/f16-instructions.ll
@@ -886,6 +886,9 @@ define half @test_pow(half %a, half %b) #0 {
ret half %r
}
+; FALLBACK-NOT: remark:{{.*}}test_exp
+; FALLBACK-FP16-NOT: remark:{{.*}}test_exp
+
; CHECK-COMMON-LABEL: test_exp:
; CHECK-COMMON-NEXT: stp x29, x30, [sp, #-16]!
; CHECK-COMMON-NEXT: mov x29, sp
@@ -894,6 +897,15 @@ define half @test_pow(half %a, half %b) #0 {
; CHECK-COMMON-NEXT: fcvt h0, s0
; CHECK-COMMON-NEXT: ldp x29, x30, [sp], #16
; CHECK-COMMON-NEXT: ret
+
+; GISEL-LABEL: test_exp:
+; GISEL-NEXT: stp x29, x30, [sp, #-16]!
+; GISEL-NEXT: mov x29, sp
+; GISEL-NEXT: fcvt s0, h0
+; GISEL-NEXT: bl {{_?}}expf
+; GISEL-NEXT: fcvt h0, s0
+; GISEL-NEXT: ldp x29, x30, [sp], #16
+; GISEL-NEXT: ret
define half @test_exp(half %a) #0 {
%r = call half @llvm.exp.f16(half %a)
ret half %r
OpenPOWER on IntegriCloud