aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/memset-strategy-29.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/memset-strategy-29.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/memset-strategy-29.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/memset-strategy-29.c b/gcc/testsuite/gcc.target/i386/memset-strategy-29.c
new file mode 100644
index 0000000..a33bf92
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/memset-strategy-29.c
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mtune=generic -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
+
+/*
+**foo:
+**...
+**.LFB[0-9]+:
+** .cfi_startproc
+** movq \$0, 49\(%rdi\)
+** xorl %eax, %eax
+** movq \$0, 57\(%rdi\)
+** movq \$0, 65\(%rdi\)
+** movq \$0, 73\(%rdi\)
+**.L[0-9]+:
+** movl %eax, %edx
+** addl \$32, %eax
+** movq \$0, \(%rdi,%rdx\)
+** movq \$0, 8\(%rdi,%rdx\)
+** movq \$0, 16\(%rdi,%rdx\)
+** movq \$0, 24\(%rdi,%rdx\)
+** cmpl \$64, %eax
+** jb .L[0-9]+
+** ret
+**...
+*/
+
+void
+foo (char *dest)
+{
+ __builtin_memset (dest, 0, 81);
+}
+
+/* { dg-final { scan-assembler-not "rep stos" } } */