diff options
Diffstat (limited to 'test/CodeGen/ARM/ghc-tcreturn-lowered.ll')
-rw-r--r-- | test/CodeGen/ARM/ghc-tcreturn-lowered.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/ghc-tcreturn-lowered.ll b/test/CodeGen/ARM/ghc-tcreturn-lowered.ll new file mode 100644 index 0000000..623b422 --- /dev/null +++ b/test/CodeGen/ARM/ghc-tcreturn-lowered.ll @@ -0,0 +1,21 @@ +; RUN: llc -mtriple=thumbv7-eabi -o - %s | FileCheck %s + +declare ghccc void @g() + +define ghccc void @test_direct_tail() { +; CHECK-LABEL: test_direct_tail: +; CHECK: b g + + tail call ghccc void @g() + ret void +} + +@ind_func = global void()* zeroinitializer + +define ghccc void @test_indirect_tail() { +; CHECK-LABEL: test_indirect_tail: +; CHECK: bx {{r[0-9]+}} + %func = load void()** @ind_func + tail call ghccc void()* %func() + ret void +} |