Home | History | Annotate | Download | only in X86
      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], [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 ; X86: ret
     24 
     25 ; XMM: xorps %xmm{{[0-9]+}}, [[Z:%xmm[0-9]+]]
     26 ; XMM: movaps [[Z]],
     27 ; XMM: movaps [[Z]],
     28 ; XMM-NOT: movaps
     29 ; XMM: ret
     30 
     31 ; YMM: vxorps %ymm{{[0-9]+}}, %ymm{{[0-9]+}}, [[Z:%ymm[0-9]+]]
     32 ; YMM: vmovaps [[Z]],
     33 ; YMM-NOT: movaps
     34 ; YMM: ret
     35 
     36 	call void @foo( %struct.x* %up_mvd116 ) nounwind 
     37 	ret void
     38 }
     39 
     40 declare void @foo(%struct.x*)
     41 
     42 declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
     43 
     44 define void @PR15348(i8* %a) {
     45 ; Ensure that alignment of '0' in an @llvm.memset intrinsic results in
     46 ; unaligned loads and stores.
     47 ; XMM: PR15348
     48 ; XMM: movb $0,
     49 ; XMM: movl $0,
     50 ; XMM: movl $0,
     51 ; XMM: movl $0,
     52 ; XMM: movl $0,
     53   call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 17, i32 0, i1 false)
     54   ret void
     55 }
     56