blob: f3b125c6e3bac854702df403719713e0e19e1879 [file] [log] [blame]
NAKAMURA Takumi4491aa42011-03-16 13:52:20 +00001; RUN: llc < %s -mtriple=x86_64-linux | 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 | 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
Rafael Espindola588af2f2007-09-07 14:52:14 +000026
Dan Gohman707e0182008-04-12 04:36:06 +000027%struct.s = type { i32, i32, i32, i32, i32, i32, i32, i32,
28 i32, i32, i32, i32, i32, i32, i32, i32,
29 i32, i32, i32, i32, i32, i32, i32, i32,
30 i32, i32, i32, i32, i32, i32, i32, i32,
31 i32 }
Rafael Espindola588af2f2007-09-07 14:52:14 +000032
Evan Cheng1887c1c2008-08-21 21:00:15 +000033define void @g(i32 %a1, i32 %a2, i32 %a3, i32 %a4, i32 %a5, i32 %a6) nounwind {
Rafael Espindola588af2f2007-09-07 14:52:14 +000034entry:
35 %d = alloca %struct.s, align 16
36 %tmp = getelementptr %struct.s* %d, i32 0, i32 0
37 store i32 %a1, i32* %tmp, align 16
38 %tmp2 = getelementptr %struct.s* %d, i32 0, i32 1
39 store i32 %a2, i32* %tmp2, align 16
40 %tmp4 = getelementptr %struct.s* %d, i32 0, i32 2
41 store i32 %a3, i32* %tmp4, align 16
42 %tmp6 = getelementptr %struct.s* %d, i32 0, i32 3
43 store i32 %a4, i32* %tmp6, align 16
44 %tmp8 = getelementptr %struct.s* %d, i32 0, i32 4
45 store i32 %a5, i32* %tmp8, align 16
46 %tmp10 = getelementptr %struct.s* %d, i32 0, i32 5
47 store i32 %a6, i32* %tmp10, align 16
Chris Lattner26b00002011-06-17 03:14:27 +000048 call void @f( %struct.s* byval %d)
49 call void @f( %struct.s* byval %d)
Rafael Espindola588af2f2007-09-07 14:52:14 +000050 ret void
51}
52
53declare void @f(%struct.s* byval)