xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/subtarget-features-long-calls.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - | FileCheck -check-prefix=NO-OPTION %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=+long-calls | FileCheck -check-prefix=LONGCALL %s
3*9880d681SAndroid Build Coastguard Worker; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=-long-calls | FileCheck -check-prefix=NO-LONGCALL %s
4*9880d681SAndroid Build Coastguard Worker; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 | FileCheck -check-prefix=NO-OPTION %s
5*9880d681SAndroid Build Coastguard Worker; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=+long-calls | FileCheck -check-prefix=LONGCALL %s
6*9880d681SAndroid Build Coastguard Worker; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=-long-calls | FileCheck -check-prefix=NO-LONGCALL %s
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker; NO-OPTION-LABEL: {{_?}}caller0
9*9880d681SAndroid Build Coastguard Worker; NO-OPTION: ldr [[R0:r[0-9]+]], [[L0:.*]]
10*9880d681SAndroid Build Coastguard Worker; NO-OPTION: blx [[R0]]
11*9880d681SAndroid Build Coastguard Worker; NO-OPTION: [[L0]]:
12*9880d681SAndroid Build Coastguard Worker; NO-OPTION: .long {{_?}}callee0
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker; LONGCALL-LABEL: {{_?}}caller0
15*9880d681SAndroid Build Coastguard Worker; LONGCALL: ldr [[R0:r[0-9]+]], [[L0:.*]]
16*9880d681SAndroid Build Coastguard Worker; LONGCALL: blx [[R0]]
17*9880d681SAndroid Build Coastguard Worker; LONGCALL: [[L0]]:
18*9880d681SAndroid Build Coastguard Worker; LONGCALL: .long {{_?}}callee0
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker; NO-LONGCALL-LABEL: {{_?}}caller0
21*9880d681SAndroid Build Coastguard Worker; NO-LONGCALL: bl {{_?}}callee0
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Workerdefine i32 @caller0() #0 {
24*9880d681SAndroid Build Coastguard Workerentry:
25*9880d681SAndroid Build Coastguard Worker  tail call void @callee0()
26*9880d681SAndroid Build Coastguard Worker  ret i32 0
27*9880d681SAndroid Build Coastguard Worker}
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Worker; NO-OPTION-LABEL: {{_?}}caller1
30*9880d681SAndroid Build Coastguard Worker; NO-OPTION: bl {{_?}}callee0
31*9880d681SAndroid Build Coastguard Worker
32*9880d681SAndroid Build Coastguard Worker; LONGCALL-LABEL: {{_?}}caller1
33*9880d681SAndroid Build Coastguard Worker; LONGCALL: ldr [[R0:r[0-9]+]], [[L0:.*]]
34*9880d681SAndroid Build Coastguard Worker; LONGCALL: blx [[R0]]
35*9880d681SAndroid Build Coastguard Worker; LONGCALL: [[L0]]:
36*9880d681SAndroid Build Coastguard Worker; LONGCALL: .long {{_?}}callee0
37*9880d681SAndroid Build Coastguard Worker
38*9880d681SAndroid Build Coastguard Worker; NO-LONGCALL-LABEL: {{_?}}caller1
39*9880d681SAndroid Build Coastguard Worker; NO-LONGCALL: bl {{_?}}callee0
40*9880d681SAndroid Build Coastguard Worker
41*9880d681SAndroid Build Coastguard Workerdefine i32 @caller1() {
42*9880d681SAndroid Build Coastguard Workerentry:
43*9880d681SAndroid Build Coastguard Worker  tail call void @callee0()
44*9880d681SAndroid Build Coastguard Worker  ret i32 0
45*9880d681SAndroid Build Coastguard Worker}
46*9880d681SAndroid Build Coastguard Worker
47*9880d681SAndroid Build Coastguard Workerdeclare void @callee0()
48*9880d681SAndroid Build Coastguard Worker
49*9880d681SAndroid Build Coastguard Workerattributes #0 = { "target-features"="+long-calls" }
50