llvm/test/CodeGen/X86/memset.ll: FileCheck-ize, and add another case on +avx.
[oota-llvm.git] / test / CodeGen / X86 / memset.ll
1 ; RUN: llc < %s -march=x86 -mcpu=pentium2 -mtriple=i686-apple-darwin8.8.0 | FileCheck %s --check-prefix=X86
2 ; RUN: llc < %s -march=x86 -mcpu=pentium3 -mtriple=i686-apple-darwin8.8.0 | FileCheck %s --check-prefix=XMM
3 ; RUN: llc < %s -march=x86 -mcpu=bdver1   -mtriple=i686-apple-darwin8.8.0 | FileCheck %s --check-prefix=YMM
4
5         %struct.x = type { i16, i16 }
6
7 define void @t() nounwind  {
8 entry:
9         %up_mvd = alloca [8 x %struct.x]                ; <[8 x %struct.x]*> [#uses=2]
10         %up_mvd116 = getelementptr [8 x %struct.x]* %up_mvd, i32 0, i32 0               ; <%struct.x*> [#uses=1]
11         %tmp110117 = bitcast [8 x %struct.x]* %up_mvd to i8*            ; <i8*> [#uses=1]
12
13         call void @llvm.memset.p0i8.i64(i8* %tmp110117, i8 0, i64 32, i32 8, i1 false)
14 ; X86: movl $0,
15 ; X86: movl $0,
16 ; X86: movl $0,
17 ; X86: movl $0,
18 ; X86: movl $0,
19 ; X86: movl $0,
20 ; X86: movl $0,
21 ; X86: movl $0,
22 ; X86-NOT: movl $0,
23
24 ; XMM: xorps %xmm{{[0-9]+}}, [[Z:%xmm[0-9]+]]
25 ; XMM: movaps [[Z]],
26 ; XMM: movaps [[Z]],
27 ; XMM-NOT: movaps
28
29 ; YMM: vxorps %ymm{{[0-9]+}}, %ymm{{[0-9]+}}, [[Z:%ymm[0-9]+]]
30 ; YMM: vmovaps [[Z]],
31 ; YMM-NOT: movaps
32
33         call void @foo( %struct.x* %up_mvd116 ) nounwind 
34         ret void
35 }
36
37 declare void @foo(%struct.x*)
38
39 declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind