| Chris Lattner | 71957a9 | 2004-02-12 17:53:43 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | llc -march=x86 | grep movs |
| 2 | declare 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 | |
| 8 | void %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 | } |