mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-01 08:23:21 +01:00
df2896d609
llvm-svn: 81290
26 lines
822 B
LLVM
26 lines
822 B
LLVM
; RUN: llc < %s -march=x86 -mtriple=i686-pc-linux-gnu | grep movs | count 1
|
|
|
|
@A = global [32 x i32] zeroinitializer
|
|
@B = global [32 x i32] zeroinitializer
|
|
|
|
declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
|
|
|
|
define void @main() nounwind {
|
|
; dword copy
|
|
call void @llvm.memcpy.i32(i8* bitcast ([32 x i32]* @A to i8*),
|
|
i8* bitcast ([32 x i32]* @B to i8*),
|
|
i32 128, i32 4 )
|
|
|
|
; word copy
|
|
call void @llvm.memcpy.i32( i8* bitcast ([32 x i32]* @A to i8*),
|
|
i8* bitcast ([32 x i32]* @B to i8*),
|
|
i32 128, i32 2 )
|
|
|
|
; byte copy
|
|
call void @llvm.memcpy.i32( i8* bitcast ([32 x i32]* @A to i8*),
|
|
i8* bitcast ([32 x i32]* @B to i8*),
|
|
i32 128, i32 1 )
|
|
|
|
ret void
|
|
}
|