Home | History | Annotate | Download | only in ARM
      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 
     23 define i32 @caller0() #0 {
     24 entry:
     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 
     41 define i32 @caller1() {
     42 entry:
     43   tail call void @callee0()
     44   ret i32 0
     45 }
     46 
     47 declare void @callee0()
     48 
     49 attributes #0 = { "target-features"="+long-calls" }
     50