1; RUN: llc < %s -mtriple=x86_64-linux -mattr=-avx | FileCheck %s -check-prefix=X64
2; X64-NOT:     movsq
3; X64:     rep
4; X64-NOT:     rep
5; X64:     movsq
6; X64-NOT:     movsq
7; X64:     rep
8; X64-NOT:     rep
9; X64:     movsq
10; X64-NOT:     rep
11; X64-NOT:     movsq
12
13; Win64 has not supported byval yet.
14
15; RUN: llc < %s -march=x86 -mattr=-avx | FileCheck %s -check-prefix=X32
16; X32-NOT:     movsl
17; X32:     rep
18; X32-NOT:     rep
19; X32:     movsl
20; X32-NOT:     movsl
21; X32:     rep
22; X32-NOT:     rep
23; X32:     movsl
24; X32-NOT:     rep
25; X32-NOT:     movsl
26
27%struct.s = type { i8, i8, i8, i8, i8, i8, i8, i8,
28                   i8, i8, i8, i8, i8, i8, i8, i8,
29                   i8, i8, i8, i8, i8, i8, i8, i8,
30                   i8, i8, i8, i8, i8, i8, i8, i8,
31                   i8, i8, i8, i8, i8, i8, i8, i8,
32                   i8, i8, i8, i8, i8, i8, i8, i8,
33                   i8, i8, i8, i8, i8, i8, i8, i8,
34                   i8, i8, i8, i8, i8, i8, i8, i8,
35                   i8, i8, i8, i8, i8, i8, i8, i8,
36                   i8, i8, i8, i8, i8, i8, i8, i8,
37                   i8, i8, i8, i8, i8, i8, i8, i8,
38                   i8, i8, i8, i8, i8, i8, i8, i8,
39                   i8, i8, i8, i8, i8, i8, i8, i8,
40                   i8, i8, i8, i8, i8, i8, i8, i8,
41                   i8, i8, i8, i8, i8, i8, i8, i8,
42                   i8, i8, i8, i8, i8, i8, i8, i8,
43                   i8 }
44
45
46define void @g(i8 signext  %a1, i8 signext  %a2, i8 signext  %a3,
47	 i8 signext  %a4, i8 signext  %a5, i8 signext  %a6) {
48entry:
49        %a = alloca %struct.s
50        %tmp = getelementptr %struct.s* %a, i32 0, i32 0
51        store i8 %a1, i8* %tmp, align 8
52        %tmp2 = getelementptr %struct.s* %a, i32 0, i32 1
53        store i8 %a2, i8* %tmp2, align 8
54        %tmp4 = getelementptr %struct.s* %a, i32 0, i32 2
55        store i8 %a3, i8* %tmp4, align 8
56        %tmp6 = getelementptr %struct.s* %a, i32 0, i32 3
57        store i8 %a4, i8* %tmp6, align 8
58        %tmp8 = getelementptr %struct.s* %a, i32 0, i32 4
59        store i8 %a5, i8* %tmp8, align 8
60        %tmp10 = getelementptr %struct.s* %a, i32 0, i32 5
61        store i8 %a6, i8* %tmp10, align 8
62        call void @f( %struct.s* byval %a )
63        call void @f( %struct.s* byval %a )
64        ret void
65}
66
67declare void @f(%struct.s* byval)
68