2010-05-16 09:08:45 +00:00
|
|
|
; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | FileCheck %s
|
2005-05-12 23:09:04 +00:00
|
|
|
; check that fastcc is passing stuff in regs.
|
|
|
|
|
2012-10-24 01:58:48 +00:00
|
|
|
declare x86_fastcallcc i64 @callee(i64 inreg)
|
2006-03-18 23:48:54 +00:00
|
|
|
|
2007-02-28 18:35:36 +00:00
|
|
|
define i64 @caller() {
|
2007-11-18 18:26:45 +00:00
|
|
|
%X = call x86_fastcallcc i64 @callee( i64 4294967299 ) ; <i64> [#uses=1]
|
2013-07-31 02:47:52 +00:00
|
|
|
; CHECK: mov{{.*}}edx, 1
|
2007-02-28 18:35:36 +00:00
|
|
|
ret i64 %X
|
2005-05-12 23:09:04 +00:00
|
|
|
}
|
|
|
|
|
2012-10-24 01:58:48 +00:00
|
|
|
define x86_fastcallcc i64 @caller2(i64 inreg %X) {
|
2007-02-28 18:35:36 +00:00
|
|
|
ret i64 %X
|
2013-07-31 02:47:52 +00:00
|
|
|
; CHECK: mov{{.*}}eax, ecx
|
2010-05-16 09:08:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
declare x86_thiscallcc i64 @callee2(i32)
|
|
|
|
|
|
|
|
define i64 @caller3() {
|
|
|
|
%X = call x86_thiscallcc i64 @callee2( i32 3 )
|
2013-07-31 02:47:52 +00:00
|
|
|
; CHECK: mov{{.*}}ecx, 3
|
2010-05-16 09:08:45 +00:00
|
|
|
ret i64 %X
|
|
|
|
}
|
|
|
|
|
|
|
|
define x86_thiscallcc i32 @caller4(i32 %X) {
|
|
|
|
ret i32 %X
|
2013-07-31 02:47:52 +00:00
|
|
|
; CHECK: mov{{.*}}eax, ecx
|
2005-05-12 23:09:04 +00:00
|
|
|
}
|
2007-02-28 18:35:36 +00:00
|
|
|
|