aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/memset-pr120683-17.c
blob: 744184c44af3418c57cfa887d17307059c4af454 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* { dg-do compile } */
/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
/* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
/* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */

/*
**foo:
**.LFB[0-9]+:
**	.cfi_startproc
**	pxor	%xmm0, %xmm0
**	xorl	%eax, %eax
**.L[0-9]+:
**	movl	%eax, %edx
**	addl	\$64, %eax
**	movaps	%xmm0, dest\(%rdx\)
**	movaps	%xmm0, dest\+16\(%rdx\)
**	movaps	%xmm0, dest\+32\(%rdx\)
**	movaps	%xmm0, dest\+48\(%rdx\)
**	cmpl	\$128, %eax
**	jb	.L[0-9]+
**	movq	\$0, dest\+48\(%rax\)
**	movaps	%xmm0, dest\(%rax\)
**	movaps	%xmm0, dest\+16\(%rax\)
**	movaps	%xmm0, dest\+32\(%rax\)
**	ret
**...
*/

char dest[184];

void
foo (void)
{
  __builtin_memset (dest, 0, sizeof (dest));
}

/* { dg-final { scan-assembler-not "rep stos" } } */