blob: 13b4bf31128c65b7850bb96ba01af9731b0109f8 [file] [log] [blame]
Chris Lattner71957a92004-02-12 17:53:43 +00001; RUN: llvm-as < %s | llc -march=x86 | grep movs
2declare sbyte* %llvm.memcpy(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 sbyte* %llvm.memcpy(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 sbyte* %llvm.memcpy(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 sbyte* %llvm.memcpy(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}