1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
llvm-mirror/test/CodeGen/X86/tailcall-calleesave.ll
Matthias Braun f7935a3f63 X86: Do not use llc -march in tests.
`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
2017-08-02 00:28:10 +00:00

20 lines
548 B
LLVM

; RUN: llc -tailcallopt -mcpu=core < %s | FileCheck %s
target triple = "i686-apple-darwin"
declare fastcc void @foo(i32, i32, i32, i32, i32, i32)
declare i32* @bar(i32*)
define fastcc void @hoge(i32 %b) nounwind {
; Do not overwrite pushed callee-save registers
; CHECK: pushl
; CHECK: subl $[[SIZE:[0-9]+]], %esp
; CHECK-NOT: [[SIZE]](%esp)
%a = alloca i32
store i32 0, i32* %a
%d = tail call i32* @bar(i32* %a) nounwind
store i32 %b, i32* %d
tail call fastcc void @foo(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6) nounwind
ret void
}