blob: 8cd9a50cbb365f63a972b3c99e0b8919e036e0c3 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep movs
2declare void %llvm.memcpy.i32(sbyte* %A, sbyte* %B, uint %amt, uint %align)
3
4%A = global [1000 x int] zeroinitializer
5%B = global [1000 x int] zeroinitializer
6
7
8void %main() {
9 ; dword copy
10 call void %llvm.memcpy.i32(sbyte* cast (int* getelementptr ([1000 x int]* %A, long 0, long 0) to sbyte*),
11 sbyte* cast (int* getelementptr ([1000 x int]* %B, long 0, long 0) to sbyte*),
12 uint 4000, uint 4)
13
14 ; word copy
15 call void %llvm.memcpy.i32(sbyte* cast (int* getelementptr ([1000 x int]* %A, long 0, long 0) to sbyte*),
16 sbyte* cast (int* getelementptr ([1000 x int]* %B, long 0, long 0) to sbyte*),
17 uint 4000, uint 2)
18
19 ; byte copy
20 call void %llvm.memcpy.i32(sbyte* cast (int* getelementptr ([1000 x int]* %A, long 0, long 0) to sbyte*),
21 sbyte* cast (int* getelementptr ([1000 x int]* %B, long 0, long 0) to sbyte*),
22 uint 4000, uint 1)
23 ret void
24}