diff options
Diffstat (limited to 'test/CodeGen/ARM/v8m-tail-call.ll')
-rw-r--r-- | test/CodeGen/ARM/v8m-tail-call.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/v8m-tail-call.ll b/test/CodeGen/ARM/v8m-tail-call.ll new file mode 100644 index 0000000000000..2c2c795838ff4 --- /dev/null +++ b/test/CodeGen/ARM/v8m-tail-call.ll @@ -0,0 +1,23 @@ +; RUN: llc %s -o - -mtriple=thumbv8m.base | FileCheck %s + +define void @test() { +; CHECK-LABEL: test: +entry: + %call = tail call i32 @foo() + %tail = tail call i32 @foo() + ret void +; CHECK: bl foo +; CHECK: bl foo +; CHECK-NOT: b foo +} + +define void @test2() { +; CHECK-LABEL: test2: +entry: + %tail = tail call i32 @foo() + ret void +; CHECK: b foo +; CHECK-NOT: bl foo +} + +declare i32 @foo() |