aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/ARM/ghc-tcreturn-lowered.ll
blob: 9731b3d39b65e0ed1847cb118562fd7c4b8cd810 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()*, void()** @ind_func
  tail call ghccc void()* %func()
  ret void
}