1 ; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - | FileCheck -check-prefix=NO-OPTION %s
2 ; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=+long-calls | FileCheck -check-prefix=LONGCALL %s
3 ; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=-long-calls | FileCheck -check-prefix=NO-LONGCALL %s
4 ; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 | FileCheck -check-prefix=NO-OPTION %s
5 ; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=+long-calls | FileCheck -check-prefix=LONGCALL %s
6 ; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=-long-calls | FileCheck -check-prefix=NO-LONGCALL %s
8 ; NO-OPTION-LABEL: {{_?}}caller0
9 ; NO-OPTION: ldr [[R0:r[0-9]+]], [[L0:.*]]
10 ; NO-OPTION: blx [[R0]]
12 ; NO-OPTION: .long {{_?}}callee0
14 ; LONGCALL-LABEL: {{_?}}caller0
15 ; LONGCALL: ldr [[R0:r[0-9]+]], [[L0:.*]]
16 ; LONGCALL: blx [[R0]]
18 ; LONGCALL: .long {{_?}}callee0
20 ; NO-LONGCALL-LABEL: {{_?}}caller0
21 ; NO-LONGCALL: bl {{_?}}callee0
23 define i32 @caller0() #0 {
25 tail call void @callee0()
29 ; NO-OPTION-LABEL: {{_?}}caller1
30 ; NO-OPTION: bl {{_?}}callee0
32 ; LONGCALL-LABEL: {{_?}}caller1
33 ; LONGCALL: ldr [[R0:r[0-9]+]], [[L0:.*]]
34 ; LONGCALL: blx [[R0]]
36 ; LONGCALL: .long {{_?}}callee0
38 ; NO-LONGCALL-LABEL: {{_?}}caller1
39 ; NO-LONGCALL: bl {{_?}}callee0
41 define i32 @caller1() {
43 tail call void @callee0()
47 declare void @callee0()
49 attributes #0 = { "target-features"="+long-calls" }