aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/v8m-tail-call.ll
blob: 2c2c795838ff4ce5188f07107ddfbacff315962e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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()