source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/ARM/subtarget-features-long-calls.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 1.6 KB
Line 
1; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - | FileCheck -check-prefix=NO-OPTION %s
2; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=+long-calls | FileCheck -check-prefix=LONGCALL %s
3; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=-long-calls | FileCheck -check-prefix=NO-LONGCALL %s
4; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 | FileCheck -check-prefix=NO-OPTION %s
5; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=+long-calls | FileCheck -check-prefix=LONGCALL %s
6; RUN: llc -march thumb -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=-long-calls | FileCheck -check-prefix=NO-LONGCALL %s
7
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
13
14; LONGCALL-LABEL: {{_?}}caller0
15; LONGCALL: ldr [[R0:r[0-9]+]], [[L0:.*]]
16; LONGCALL: blx [[R0]]
17; LONGCALL: [[L0]]:
18; LONGCALL: .long {{_?}}callee0
19
20; NO-LONGCALL-LABEL: {{_?}}caller0
21; NO-LONGCALL: bl {{_?}}callee0
22
23define i32 @caller0() #0 {
24entry:
25  tail call void @callee0()
26  ret i32 0
27}
28
29; NO-OPTION-LABEL: {{_?}}caller1
30; NO-OPTION: bl {{_?}}callee0
31
32; LONGCALL-LABEL: {{_?}}caller1
33; LONGCALL: ldr [[R0:r[0-9]+]], [[L0:.*]]
34; LONGCALL: blx [[R0]]
35; LONGCALL: [[L0]]:
36; LONGCALL: .long {{_?}}callee0
37
38; NO-LONGCALL-LABEL: {{_?}}caller1
39; NO-LONGCALL: bl {{_?}}callee0
40
41define i32 @caller1() {
42entry:
43  tail call void @callee0()
44  ret i32 0
45}
46
47declare void @callee0()
48
49attributes #0 = { "target-features"="+long-calls" }
Note: See TracBrowser for help on using the repository browser.