blob: 56bb21caf3ca9889dcd4b19b43697c70ef084880 [file] [log] [blame]
Evan Cheng9a6e0fa2008-08-21 21:00:15 +00001; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-pc-linux-gnu | grep movs | count 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Rafael Espindola5d3e7622007-08-27 10:18:20 +00003@A = global [32 x i32] zeroinitializer
4@B = global [32 x i32] zeroinitializer
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005
Rafael Espindola5d3e7622007-08-27 10:18:20 +00006declare void @llvm.memcpy.i32(i8*, i8*, i32, i32)
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007
Evan Cheng9a6e0fa2008-08-21 21:00:15 +00008define void @main() nounwind {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009 ; dword copy
Rafael Espindola5d3e7622007-08-27 10:18:20 +000010 call void @llvm.memcpy.i32(i8* bitcast ([32 x i32]* @A to i8*),
11 i8* bitcast ([32 x i32]* @B to i8*),
12 i32 128, i32 4 )
Dan Gohmanf17a25c2007-07-18 16:29:46 +000013
14 ; word copy
Rafael Espindola5d3e7622007-08-27 10:18:20 +000015 call void @llvm.memcpy.i32( i8* bitcast ([32 x i32]* @A to i8*),
16 i8* bitcast ([32 x i32]* @B to i8*),
17 i32 128, i32 2 )
Dan Gohmanf17a25c2007-07-18 16:29:46 +000018
19 ; byte copy
Rafael Espindola5d3e7622007-08-27 10:18:20 +000020 call void @llvm.memcpy.i32( i8* bitcast ([32 x i32]* @A to i8*),
21 i8* bitcast ([32 x i32]* @B to i8*),
22 i32 128, i32 1 )
23
Dan Gohmanf17a25c2007-07-18 16:29:46 +000024 ret void
25}