mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
f7935a3f63
`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: 309774
41 lines
1.1 KiB
LLVM
41 lines
1.1 KiB
LLVM
; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s --check-prefix=NO-OPTION
|
|
; RUN: llc < %s -mtriple=x86_64-- -disable-tail-calls | FileCheck %s --check-prefix=DISABLE-TRUE
|
|
; RUN: llc < %s -mtriple=x86_64-- -disable-tail-calls=false | FileCheck %s --check-prefix=DISABLE-FALSE
|
|
|
|
; Check that command line option "-disable-tail-calls" overrides function
|
|
; attribute "disable-tail-calls".
|
|
|
|
; NO-OPTION-LABEL: {{\_?}}func_attr
|
|
; NO-OPTION: callq {{\_?}}callee
|
|
|
|
; DISABLE-FALSE-LABEL: {{\_?}}func_attr
|
|
; DISABLE-FALSE: jmp {{\_?}}callee
|
|
|
|
; DISABLE-TRUE-LABEL: {{\_?}}func_attr
|
|
; DISABLE-TRUE: callq {{\_?}}callee
|
|
|
|
define i32 @func_attr(i32 %a) #0 {
|
|
entry:
|
|
%call = tail call i32 @callee(i32 %a)
|
|
ret i32 %call
|
|
}
|
|
|
|
; NO-OPTION-LABEL: {{\_?}}func_noattr
|
|
; NO-OPTION: jmp {{\_?}}callee
|
|
|
|
; DISABLE-FALSE-LABEL: {{\_?}}func_noattr
|
|
; DISABLE-FALSE: jmp {{\_?}}callee
|
|
|
|
; DISABLE-TRUE-LABEL: {{\_?}}func_noattr
|
|
; DISABLE-TRUE: callq {{\_?}}callee
|
|
|
|
define i32 @func_noattr(i32 %a) {
|
|
entry:
|
|
%call = tail call i32 @callee(i32 %a)
|
|
ret i32 %call
|
|
}
|
|
|
|
declare i32 @callee(i32)
|
|
|
|
attributes #0 = { "disable-tail-calls"="true" }
|