aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/memset-pr120683-12.c
blob: 91128977fadf1f07bb8cc5edc722f25ee67df539 (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
/* { dg-do compile } */
/* { dg-options "-O2 -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=unrolled_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
**	movabsq	\$72340172838076673, %rax
**	movzbl	%sil, %esi
**	imulq	%rax, %rsi
**	movq	%rsi, 48\(%rdi\)
**	movq	%rsi, \(%rdi\)
**	movq	%rsi, 8\(%rdi\)
**	movq	%rsi, 16\(%rdi\)
**	movq	%rsi, 24\(%rdi\)
**	movq	%rsi, 32\(%rdi\)
**	movq	%rsi, 40\(%rdi\)
**	movq	%rsi, 53\(%rdi\)
**	ret
**...
*/

void
foo (char *dest, int c)
{
  __builtin_memset (dest, c, 61);
}

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