2014-12-01 17:46:39 +00:00
|
|
|
; RUN: llc -mtriple=thumbv7-eabi -o - %s | FileCheck %s
|
|
|
|
|
2014-12-01 21:04:44 +00:00
|
|
|
declare ghccc void @g()
|
2014-12-01 17:46:39 +00:00
|
|
|
|
2014-12-01 21:04:44 +00:00
|
|
|
define ghccc void @test_direct_tail() {
|
2014-12-01 17:46:39 +00:00
|
|
|
; CHECK-LABEL: test_direct_tail:
|
|
|
|
; CHECK: b g
|
|
|
|
|
2014-12-01 21:04:44 +00:00
|
|
|
tail call ghccc void @g()
|
2014-12-01 17:46:39 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
@ind_func = global void()* zeroinitializer
|
|
|
|
|
2014-12-01 21:04:44 +00:00
|
|
|
define ghccc void @test_indirect_tail() {
|
2014-12-01 17:46:39 +00:00
|
|
|
; CHECK-LABEL: test_indirect_tail:
|
|
|
|
; CHECK: bx {{r[0-9]+}}
|
|
|
|
%func = load void()** @ind_func
|
2014-12-01 21:04:44 +00:00
|
|
|
tail call ghccc void()* %func()
|
2014-12-01 17:46:39 +00:00
|
|
|
ret void
|
|
|
|
}
|