1 ; RUN: llc < %s -mtriple=x86_64-pc-win32 | FileCheck %s
2 ; RUN: llc < %s -mtriple=x86_64-pc-linux | FileCheck %s -check-prefix=LINUX
4 ; Verify that the 5th and 6th parameters are coming from the correct location
6 define i32 @f6(i32 %p1, i32 %p2, i32 %p3, i32 %p4, i32 %p5, i32 %p6) nounwind readnone optsize {
8 ; CHECK: movl 48(%rsp), %eax
9 ; CHECK: addl 40(%rsp), %eax
10 ; LINUX: leal (%r8,%r9), %eax
11 %add = add nsw i32 %p6, %p5
15 define win64cc i32 @f7(i32 %p1, i32 %p2, i32 %p3, i32 %p4, i32 %p5, i32 %p6) nounwind readnone optsize {
17 ; CHECK: movl 48(%rsp), %eax
18 ; CHECK: addl 40(%rsp), %eax
19 ; LINUX: movl 48(%rsp), %eax
20 ; LINUX: addl 40(%rsp), %eax
21 %add = add nsw i32 %p6, %p5
25 ; Verify that even though we're compiling for Windows, parameters behave as
26 ; on other platforms here (note the x86_64_sysvcc calling convention).
27 define x86_64_sysvcc i32 @f8(i32 %p1, i32 %p2, i32 %p3, i32 %p4, i32 %p5, i32 %p6) nounwind readnone optsize {
29 ; CHECK: leal (%r8,%r9), %eax
30 ; LINUX: leal (%r8,%r9), %eax
31 %add = add nsw i32 %p6, %p5