1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 -mcpu=pentium2 -mtriple=i686-apple-darwin8.8.0 | FileCheck %s --check-prefix=X86 2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 -mcpu=pentium3 -mtriple=i686-apple-darwin8.8.0 | FileCheck %s --check-prefix=XMM 3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 -mcpu=bdver1 -mtriple=i686-apple-darwin8.8.0 | FileCheck %s --check-prefix=YMM 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker %struct.x = type { i16, i16 } 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Workerdefine void @t() nounwind { 8*9880d681SAndroid Build Coastguard Workerentry: 9*9880d681SAndroid Build Coastguard Worker %up_mvd = alloca [8 x %struct.x] ; <[8 x %struct.x]*> [#uses=2] 10*9880d681SAndroid Build Coastguard Worker %up_mvd116 = getelementptr [8 x %struct.x], [8 x %struct.x]* %up_mvd, i32 0, i32 0 ; <%struct.x*> [#uses=1] 11*9880d681SAndroid Build Coastguard Worker %tmp110117 = bitcast [8 x %struct.x]* %up_mvd to i8* ; <i8*> [#uses=1] 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker call void @llvm.memset.p0i8.i64(i8* %tmp110117, i8 0, i64 32, i32 8, i1 false) 14*9880d681SAndroid Build Coastguard Worker; X86: movl $0, 15*9880d681SAndroid Build Coastguard Worker; X86: movl $0, 16*9880d681SAndroid Build Coastguard Worker; X86: movl $0, 17*9880d681SAndroid Build Coastguard Worker; X86: movl $0, 18*9880d681SAndroid Build Coastguard Worker; X86: movl $0, 19*9880d681SAndroid Build Coastguard Worker; X86: movl $0, 20*9880d681SAndroid Build Coastguard Worker; X86: movl $0, 21*9880d681SAndroid Build Coastguard Worker; X86: movl $0, 22*9880d681SAndroid Build Coastguard Worker; X86-NOT: movl $0, 23*9880d681SAndroid Build Coastguard Worker; X86: ret 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Worker; XMM: xorps %xmm{{[0-9]+}}, [[Z:%xmm[0-9]+]] 26*9880d681SAndroid Build Coastguard Worker; XMM: movaps [[Z]], 27*9880d681SAndroid Build Coastguard Worker; XMM: movaps [[Z]], 28*9880d681SAndroid Build Coastguard Worker; XMM-NOT: movaps 29*9880d681SAndroid Build Coastguard Worker; XMM: ret 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Worker; YMM: vxorps %ymm{{[0-9]+}}, %ymm{{[0-9]+}}, [[Z:%ymm[0-9]+]] 32*9880d681SAndroid Build Coastguard Worker; YMM: vmovaps [[Z]], 33*9880d681SAndroid Build Coastguard Worker; YMM-NOT: movaps 34*9880d681SAndroid Build Coastguard Worker; YMM: ret 35*9880d681SAndroid Build Coastguard Worker 36*9880d681SAndroid Build Coastguard Worker call void @foo( %struct.x* %up_mvd116 ) nounwind 37*9880d681SAndroid Build Coastguard Worker ret void 38*9880d681SAndroid Build Coastguard Worker} 39*9880d681SAndroid Build Coastguard Worker 40*9880d681SAndroid Build Coastguard Workerdeclare void @foo(%struct.x*) 41*9880d681SAndroid Build Coastguard Worker 42*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind 43*9880d681SAndroid Build Coastguard Worker 44*9880d681SAndroid Build Coastguard Workerdefine void @PR15348(i8* %a) { 45*9880d681SAndroid Build Coastguard Worker; Ensure that alignment of '0' in an @llvm.memset intrinsic results in 46*9880d681SAndroid Build Coastguard Worker; unaligned loads and stores. 47*9880d681SAndroid Build Coastguard Worker; XMM: PR15348 48*9880d681SAndroid Build Coastguard Worker; XMM: movb $0, 49*9880d681SAndroid Build Coastguard Worker; XMM: movl $0, 50*9880d681SAndroid Build Coastguard Worker; XMM: movl $0, 51*9880d681SAndroid Build Coastguard Worker; XMM: movl $0, 52*9880d681SAndroid Build Coastguard Worker; XMM: movl $0, 53*9880d681SAndroid Build Coastguard Worker call void @llvm.memset.p0i8.i64(i8* %a, i8 0, i64 17, i32 0, i1 false) 54*9880d681SAndroid Build Coastguard Worker ret void 55*9880d681SAndroid Build Coastguard Worker} 56