brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.3 KiB · 910c73a Raw
140 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mcpu=pentium2 -mtriple=i686-apple-darwin8.8.0 | FileCheck %s --check-prefix=X863; RUN: llc < %s -mcpu=pentium3 -mtriple=i686-apple-darwin8.8.0 | FileCheck %s --check-prefix=XMM4; RUN: llc < %s -mcpu=bdver1   -mtriple=i686-apple-darwin8.8.0 | FileCheck %s --check-prefix=YMM5 6%struct.x = type { i16, i16 }7 8define void @t() nounwind  {9; X86-LABEL: t:10; X86:       ## %bb.0: ## %entry11; X86-NEXT:    subl $44, %esp12; X86-NEXT:    movl $0, {{[0-9]+}}(%esp)13; X86-NEXT:    movl $0, {{[0-9]+}}(%esp)14; X86-NEXT:    movl $0, {{[0-9]+}}(%esp)15; X86-NEXT:    movl $0, {{[0-9]+}}(%esp)16; X86-NEXT:    movl $0, {{[0-9]+}}(%esp)17; X86-NEXT:    movl $0, {{[0-9]+}}(%esp)18; X86-NEXT:    movl $0, {{[0-9]+}}(%esp)19; X86-NEXT:    movl $0, {{[0-9]+}}(%esp)20; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax21; X86-NEXT:    movl %eax, (%esp)22; X86-NEXT:    calll _foo23; X86-NEXT:    addl $44, %esp24; X86-NEXT:    retl25;26; XMM-LABEL: t:27; XMM:       ## %bb.0: ## %entry28; XMM-NEXT:    subl $60, %esp29; XMM-NEXT:    xorps %xmm0, %xmm030; XMM-NEXT:    movaps %xmm0, {{[0-9]+}}(%esp)31; XMM-NEXT:    movaps %xmm0, {{[0-9]+}}(%esp)32; XMM-NEXT:    leal {{[0-9]+}}(%esp), %eax33; XMM-NEXT:    movl %eax, (%esp)34; XMM-NEXT:    calll _foo35; XMM-NEXT:    addl $60, %esp36; XMM-NEXT:    retl37;38; YMM-LABEL: t:39; YMM:       ## %bb.0: ## %entry40; YMM-NEXT:    subl $60, %esp41; YMM-NEXT:    leal {{[0-9]+}}(%esp), %eax42; YMM-NEXT:    vxorps %xmm0, %xmm0, %xmm043; YMM-NEXT:    vmovups %ymm0, {{[0-9]+}}(%esp)44; YMM-NEXT:    movl %eax, (%esp)45; YMM-NEXT:    vzeroupper46; YMM-NEXT:    calll _foo47; YMM-NEXT:    addl $60, %esp48; YMM-NEXT:    retl49entry:50	%up_mvd = alloca [8 x %struct.x]		; <ptr> [#uses=2]51	%up_mvd116 = getelementptr [8 x %struct.x], ptr %up_mvd, i32 0, i32 0		; <ptr> [#uses=1]52 53	call void @llvm.memset.p0.i64(ptr align 8 %up_mvd, i8 0, i64 32, i1 false)54	call void @foo( ptr %up_mvd116 ) nounwind55	ret void56}57 58declare void @foo(ptr)59 60declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i1) nounwind61 62; Ensure that alignment of '0' in an @llvm.memset intrinsic results in63; unaligned loads and stores.64define void @PR15348(ptr %a) {65; X86-LABEL: PR15348:66; X86:       ## %bb.0:67; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax68; X86-NEXT:    movb $0, 16(%eax)69; X86-NEXT:    movl $0, 12(%eax)70; X86-NEXT:    movl $0, 8(%eax)71; X86-NEXT:    movl $0, 4(%eax)72; X86-NEXT:    movl $0, (%eax)73; X86-NEXT:    retl74;75; XMM-LABEL: PR15348:76; XMM:       ## %bb.0:77; XMM-NEXT:    movl {{[0-9]+}}(%esp), %eax78; XMM-NEXT:    movb $0, 16(%eax)79; XMM-NEXT:    movl $0, 12(%eax)80; XMM-NEXT:    movl $0, 8(%eax)81; XMM-NEXT:    movl $0, 4(%eax)82; XMM-NEXT:    movl $0, (%eax)83; XMM-NEXT:    retl84;85; YMM-LABEL: PR15348:86; YMM:       ## %bb.0:87; YMM-NEXT:    movl {{[0-9]+}}(%esp), %eax88; YMM-NEXT:    vxorps %xmm0, %xmm0, %xmm089; YMM-NEXT:    vmovups %xmm0, (%eax)90; YMM-NEXT:    movb $0, 16(%eax)91; YMM-NEXT:    retl92  call void @llvm.memset.p0.i64(ptr %a, i8 0, i64 17, i1 false)93  ret void94}95 96declare void @llvm.memset.p0.i32(ptr nocapture writeonly, i8, i32, i1 immarg)97 98define void @PR83077(ptr %a) {99; X86-LABEL: PR83077:100; X86:       ## %bb.0:101; X86-NEXT:    pushl %edi102; X86-NEXT:    .cfi_def_cfa_offset 8103; X86-NEXT:    .cfi_offset %edi, -8104; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx105; X86-NEXT:    movl $-1, %eax106; X86-NEXT:    movl $22, %ecx107; X86-NEXT:    movl %edx, %edi108; X86-NEXT:    rep;stosl %eax, %es:(%edi)109; X86-NEXT:    movw $-1, 88(%edx)110; X86-NEXT:    popl %edi111; X86-NEXT:    retl112;113; XMM-LABEL: PR83077:114; XMM:       ## %bb.0:115; XMM-NEXT:    pushl %edi116; XMM-NEXT:    .cfi_def_cfa_offset 8117; XMM-NEXT:    .cfi_offset %edi, -8118; XMM-NEXT:    movl {{[0-9]+}}(%esp), %edx119; XMM-NEXT:    movl $-1, %eax120; XMM-NEXT:    movl $22, %ecx121; XMM-NEXT:    movl %edx, %edi122; XMM-NEXT:    rep;stosl %eax, %es:(%edi)123; XMM-NEXT:    movw $-1, 88(%edx)124; XMM-NEXT:    popl %edi125; XMM-NEXT:    retl126;127; YMM-LABEL: PR83077:128; YMM:       ## %bb.0:129; YMM-NEXT:    movl {{[0-9]+}}(%esp), %eax130; YMM-NEXT:    vxorps %xmm0, %xmm0, %xmm0131; YMM-NEXT:    vcmptrueps %ymm0, %ymm0, %ymm0132; YMM-NEXT:    vmovups %ymm0, 58(%eax)133; YMM-NEXT:    vmovups %ymm0, 32(%eax)134; YMM-NEXT:    vmovups %ymm0, (%eax)135; YMM-NEXT:    vzeroupper136; YMM-NEXT:    retl137  call void @llvm.memset.p0.i32(ptr noundef nonnull align 4 dereferenceable(90) %a, i8 -1, i32 90, i1 false)138  ret void139}140