llvm-project/llvm/test/CodeGen/X86/fast-cc-pass-in-regs.ll

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
686 B
LLVM
Raw Normal View History

; RUN: llc < %s -mtriple=i686-- -x86-asm-syntax=intel | FileCheck %s
2005-05-13 07:09:04 +08:00
; check that fastcc is passing stuff in regs.
declare x86_fastcallcc i64 @callee(i64 inreg)
2007-03-01 02:35:36 +08:00
define i64 @caller() {
%X = call x86_fastcallcc i64 @callee( i64 4294967299 ) ; <i64> [#uses=1]
; CHECK: mov{{.*}}edx, 1
2007-03-01 02:35:36 +08:00
ret i64 %X
2005-05-13 07:09:04 +08:00
}
define x86_fastcallcc i64 @caller2(i64 inreg %X) {
2007-03-01 02:35:36 +08:00
ret i64 %X
; CHECK: mov{{.*}}eax, ecx
}
declare x86_thiscallcc i64 @callee2(i32)
define i64 @caller3() {
%X = call x86_thiscallcc i64 @callee2( i32 3 )
; CHECK: mov{{.*}}ecx, 3
ret i64 %X
}
define x86_thiscallcc i32 @caller4(i32 %X) {
ret i32 %X
; CHECK: mov{{.*}}eax, ecx
2005-05-13 07:09:04 +08:00
}
2007-03-01 02:35:36 +08:00