summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AArch64/GlobalISel
diff options
context:
space:
mode:
authorAditya Nandakumar <aditya_nandakumar@apple.com>2017-06-27 22:19:32 +0000
committerAditya Nandakumar <aditya_nandakumar@apple.com>2017-06-27 22:19:32 +0000
commitcca75d24069efb69b10742c1663cbc03bdd0a9a5 (patch)
tree279b85928121796dea002e673a977ea8634474f8 /llvm/test/CodeGen/AArch64/GlobalISel
parent650c96e0a73ba27d83da92db55c1b188f393fcd9 (diff)
downloadbcm5719-llvm-cca75d24069efb69b10742c1663cbc03bdd0a9a5.tar.gz
bcm5719-llvm-cca75d24069efb69b10742c1663cbc03bdd0a9a5.zip
[GISel]: Add G_FEXP, G_FEXP2 opcodes
Also add IRTranslator support. https://reviews.llvm.org/D34710 llvm-svn: 306475
Diffstat (limited to 'llvm/test/CodeGen/AArch64/GlobalISel')
-rw-r--r--llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
index 81b42d06481..0295210f86c 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
@@ -1271,6 +1271,26 @@ define float @test_fma_intrin(float %a, float %b, float %c) {
ret float %res
}
+declare float @llvm.exp.f32(float)
+define float @test_exp_intrin(float %a) {
+; CHECK-LABEL: name: test_exp_intrin
+; CHECK: [[A:%[0-9]+]](s32) = COPY %s0
+; CHECK: [[RES:%[0-9]+]](s32) = G_FEXP [[A]]
+; CHECK: %s0 = COPY [[RES]]
+ %res = call float @llvm.exp.f32(float %a)
+ ret float %res
+}
+
+declare float @llvm.exp2.f32(float)
+define float @test_exp2_intrin(float %a) {
+; CHECK-LABEL: name: test_exp2_intrin
+; CHECK: [[A:%[0-9]+]](s32) = COPY %s0
+; CHECK: [[RES:%[0-9]+]](s32) = G_FEXP2 [[A]]
+; CHECK: %s0 = COPY [[RES]]
+ %res = call float @llvm.exp2.f32(float %a)
+ ret float %res
+}
+
declare void @llvm.lifetime.start.p0i8(i64, i8*)
declare void @llvm.lifetime.end.p0i8(i64, i8*)
define void @test_lifetime_intrin() {
OpenPOWER on IntegriCloud