1 ; When we accept small parameters on Windows, make sure we do not assume they
2 ; are zero or sign extended in memory or in registers.
4 ; RUN: llc < %s -mtriple=x86_64-windows-msvc | FileCheck %s --check-prefix=WIN64
5 ; RUN: llc < %s -mtriple=x86_64-windows-gnu | FileCheck %s --check-prefix=WIN64
6 ; RUN: llc < %s -mtriple=i686-windows-msvc | FileCheck %s --check-prefix=WIN32
7 ; RUN: llc < %s -mtriple=i686-windows-gnu | FileCheck %s --check-prefix=WIN32
11 %rv = call i32 @manyargs(i8 1, i16 2, i8 3, i16 4, i8 5, i16 6)
15 define i32 @manyargs(i8 %a, i16 %b, i8 %c, i16 %d, i8 %e, i16 %f) {
17 %aa = sext i8 %a to i32
18 %bb = sext i16 %b to i32
19 %cc = zext i8 %c to i32
20 %dd = zext i16 %d to i32
21 %ee = zext i8 %e to i32
22 %ff = zext i16 %f to i32
23 %t0 = add i32 %aa, %bb
24 %t1 = add i32 %t0, %cc
25 %t2 = add i32 %t1, %dd
26 %t3 = add i32 %t2, %ee
27 %t4 = add i32 %t3, %ff
32 ; WIN64-DAG: movw $6, 40(%rsp)
33 ; WIN64-DAG: movb $5, 32(%rsp)
34 ; WIN64-DAG: movb $1, %cl
35 ; WIN64-DAG: movw $2, %dx
36 ; WIN64-DAG: movb $3, %r8b
37 ; WIN64-DAG: movw $4, %r9w
38 ; WIN64: callq manyargs
40 ; WIN64-LABEL: manyargs:
41 ; WIN64-DAG: movsbl %cl,
42 ; WIN64-DAG: movswl %dx,
43 ; WIN64-DAG: movzbl %r8b,
44 ; WIN64-DAG: movzwl %r9w,
45 ; WIN64-DAG: movzbl 40(%rsp),
46 ; WIN64-DAG: movzwl 48(%rsp),
57 ; WIN32: calll _manyargs
59 ; WIN32-LABEL: _manyargs:
63 ; WIN32-DAG: movsbl 16(%esp),
64 ; WIN32-DAG: movswl 20(%esp),
65 ; WIN32-DAG: movzbl 24(%esp),
66 ; WIN32-DAG: movzwl 28(%esp),
67 ; WIN32-DAG: movzbl 32(%esp),
68 ; WIN32-DAG: movzwl 36(%esp),