mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
d2e6077460
`llc -march` is problematic because it only switches the target architecture, but leaves the operating system unchanged. This occasionally leads to indeterministic tests because the OS from LLVM_DEFAULT_TARGET_TRIPLE is used. However we can simply always use `llc -mtriple` instead. This changes all the tests to do this to avoid people using -march when they copy and paste parts of tests. See also the discussion in https://reviews.llvm.org/D35287 llvm-svn: 309755
50 lines
1.6 KiB
LLVM
50 lines
1.6 KiB
LLVM
; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - | FileCheck -check-prefix=NO-OPTION %s
|
|
; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=+long-calls | FileCheck -check-prefix=LONGCALL %s
|
|
; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=-long-calls | FileCheck -check-prefix=NO-LONGCALL %s
|
|
; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 | FileCheck -check-prefix=NO-OPTION %s
|
|
; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=+long-calls | FileCheck -check-prefix=LONGCALL %s
|
|
; RUN: llc -mtriple=thumb-- -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=-long-calls | FileCheck -check-prefix=NO-LONGCALL %s
|
|
|
|
; NO-OPTION-LABEL: {{_?}}caller0
|
|
; NO-OPTION: ldr [[R0:r[0-9]+]], [[L0:.*]]
|
|
; NO-OPTION: blx [[R0]]
|
|
; NO-OPTION: [[L0]]:
|
|
; NO-OPTION: .long {{_?}}callee0
|
|
|
|
; LONGCALL-LABEL: {{_?}}caller0
|
|
; LONGCALL: ldr [[R0:r[0-9]+]], [[L0:.*]]
|
|
; LONGCALL: blx [[R0]]
|
|
; LONGCALL: [[L0]]:
|
|
; LONGCALL: .long {{_?}}callee0
|
|
|
|
; NO-LONGCALL-LABEL: {{_?}}caller0
|
|
; NO-LONGCALL: bl {{_?}}callee0
|
|
|
|
define i32 @caller0() #0 {
|
|
entry:
|
|
tail call void @callee0()
|
|
ret i32 0
|
|
}
|
|
|
|
; NO-OPTION-LABEL: {{_?}}caller1
|
|
; NO-OPTION: bl {{_?}}callee0
|
|
|
|
; LONGCALL-LABEL: {{_?}}caller1
|
|
; LONGCALL: ldr [[R0:r[0-9]+]], [[L0:.*]]
|
|
; LONGCALL: blx [[R0]]
|
|
; LONGCALL: [[L0]]:
|
|
; LONGCALL: .long {{_?}}callee0
|
|
|
|
; NO-LONGCALL-LABEL: {{_?}}caller1
|
|
; NO-LONGCALL: bl {{_?}}callee0
|
|
|
|
define i32 @caller1() {
|
|
entry:
|
|
tail call void @callee0()
|
|
ret i32 0
|
|
}
|
|
|
|
declare void @callee0()
|
|
|
|
attributes #0 = { "target-features"="+long-calls" }
|