[MIParser] Set RegClassOrRegBank during instruction parsing
[llvm-complete.git] / test / CodeGen / ARM / subtarget-features-long-calls.ll
blob112a840ba92ee181de98e7a37dd2e1cd1381ae63
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]]
11 ; NO-OPTION: [[L0]]:
12 ; NO-OPTION: .long {{_?}}callee0
14 ; LONGCALL-LABEL: {{_?}}caller0
15 ; LONGCALL: ldr [[R0:r[0-9]+]], [[L0:.*]]
16 ; LONGCALL: blx [[R0]]
17 ; LONGCALL: [[L0]]:
18 ; LONGCALL: .long {{_?}}callee0
20 ; NO-LONGCALL-LABEL: {{_?}}caller0
21 ; NO-LONGCALL: bl {{_?}}callee0
23 define i32 @caller0() #0 {
24 entry:
25   tail call void @callee0()
26   ret i32 0
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]]
35 ; LONGCALL: [[L0]]:
36 ; LONGCALL: .long {{_?}}callee0
38 ; NO-LONGCALL-LABEL: {{_?}}caller1
39 ; NO-LONGCALL: bl {{_?}}callee0
41 define i32 @caller1() {
42 entry:
43   tail call void @callee0()
44   ret i32 0
47 declare void @callee0()
49 attributes #0 = { "target-features"="+long-calls" }