llvm.org GIT mirror llvm / d86323e
Add a couple of test cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51441 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 11 years ago
2 changed file(s) with 33 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=-sse | grep mov | count 7
1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep mov | count 5
2
3 %struct.ParmT = type { [25 x i8], i8, i8* }
4 @.str12 = internal constant [25 x i8] c"image\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00" ; <[25 x i8]*> [#uses=1]
5
6 declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind
7
8 define void @t(i32 %argc, i8** %argv) nounwind {
9 entry:
10 %parms.i = alloca [13 x %struct.ParmT] ; <[13 x %struct.ParmT]*> [#uses=1]
11 %parms1.i = getelementptr [13 x %struct.ParmT]* %parms.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
12 call void @llvm.memcpy.i32( i8* %parms1.i, i8* getelementptr ([25 x i8]* @.str12, i32 0, i32 0), i32 25, i32 1 ) nounwind
13 unreachable
14 }
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=-sse | grep mov | count 9
1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep mov | count 3
2
3 %struct.x = type { i16, i16 }
4
5 define void @t() nounwind {
6 entry:
7 %up_mvd = alloca [8 x %struct.x] ; <[8 x %struct.x]*> [#uses=2]
8 %up_mvd116 = getelementptr [8 x %struct.x]* %up_mvd, i32 0, i32 0 ; <%struct.x*> [#uses=1]
9 %tmp110117 = bitcast [8 x %struct.x]* %up_mvd to i8* ; [#uses=1]
10 call void @llvm.memset.i64( i8* %tmp110117, i8 0, i64 32, i32 8 )
11 call void @foo( %struct.x* %up_mvd116 ) nounwind
12 ret void
13 }
14
15 declare void @foo(%struct.x*)
16
17 declare void @llvm.memset.i64(i8*, i8, i64, i32) nounwind