aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/memset-strategy-25.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/memset-strategy-25.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/memset-strategy-25.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/memset-strategy-25.c b/gcc/testsuite/gcc.target/i386/memset-strategy-25.c
new file mode 100644
index 0000000..7bd5d43
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/memset-strategy-25.c
@@ -0,0 +1,34 @@
+/* { 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, 221\(%rdi\)
+** xorl %eax, %eax
+** movq \$0, 229\(%rdi\)
+** movq \$0, 237\(%rdi\)
+** movq \$0, 245\(%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 \$224, %eax
+** jb .L[0-9]+
+** ret
+**...
+*/
+
+void
+foo (char *dest)
+{
+ __builtin_memset (dest, 0, 253);
+}
+
+/* { dg-final { scan-assembler-not "rep stos" } } */