Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep movs |
| 2 | declare 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 | |
| 8 | void %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 | } |