2006-12-02 04:23:10 +00:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep movs
|
2006-12-02 20:41:53 +00:00
|
|
|
declare void %llvm.memcpy.i32(sbyte* %A, sbyte* %B, uint %amt, uint %align)
|
2004-02-12 17:53:43 +00:00
|
|
|
|
|
|
|
%A = global [1000 x int] zeroinitializer
|
|
|
|
%B = global [1000 x int] zeroinitializer
|
|
|
|
|
|
|
|
|
|
|
|
void %main() {
|
|
|
|
; dword copy
|
2006-12-02 20:41:53 +00:00
|
|
|
call void %llvm.memcpy.i32(sbyte* cast (int* getelementptr ([1000 x int]* %A, long 0, long 0) to sbyte*),
|
2004-02-12 17:53:43 +00:00
|
|
|
sbyte* cast (int* getelementptr ([1000 x int]* %B, long 0, long 0) to sbyte*),
|
|
|
|
uint 4000, uint 4)
|
|
|
|
|
|
|
|
; word copy
|
2006-12-02 20:41:53 +00:00
|
|
|
call void %llvm.memcpy.i32(sbyte* cast (int* getelementptr ([1000 x int]* %A, long 0, long 0) to sbyte*),
|
2004-02-12 17:53:43 +00:00
|
|
|
sbyte* cast (int* getelementptr ([1000 x int]* %B, long 0, long 0) to sbyte*),
|
|
|
|
uint 4000, uint 2)
|
|
|
|
|
|
|
|
; byte copy
|
2006-12-02 20:41:53 +00:00
|
|
|
call void %llvm.memcpy.i32(sbyte* cast (int* getelementptr ([1000 x int]* %A, long 0, long 0) to sbyte*),
|
2004-02-12 17:53:43 +00:00
|
|
|
sbyte* cast (int* getelementptr ([1000 x int]* %B, long 0, long 0) to sbyte*),
|
|
|
|
uint 4000, uint 1)
|
|
|
|
ret void
|
|
|
|
}
|