aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/memset-strategy-31.c
blob: 4791c4dd17c9ec97db4e8e58c2019645fcc51922 (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
/* { dg-do compile } */
/* { dg-options "-O2 -mtune=generic -mno-avx -msse2" } */
/* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
/* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */

/*
**foo:
**.LFB[0-9]+:
**...
**	pxor	%xmm0, %xmm0
**	xorl	%eax, %eax
**	movups	%xmm0, 190\(%rdi\)
**	movups	%xmm0, 206\(%rdi\)
**	movups	%xmm0, 222\(%rdi\)
**	movups	%xmm0, 238\(%rdi\)
**.L[0-9]+:
**	movl	%eax, %edx
**	addl	\$64, %eax
**	movups	%xmm0, \(%rdi,%rdx\)
**	movups	%xmm0, 16\(%rdi,%rdx\)
**	movups	%xmm0, 32\(%rdi,%rdx\)
**	movups	%xmm0, 48\(%rdi,%rdx\)
**	cmpl	\$192, %eax
**	jb	.L[0-9]+
**...
*/

void
foo (char *dest)
{
  __builtin_memset (dest, 0, 254);
}

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