aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr111657-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr111657-1.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/pr111657-1.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr111657-1.c b/gcc/testsuite/gcc.target/i386/pr111657-1.c
new file mode 100644
index 0000000..fa9f4cf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr111657-1.c
@@ -0,0 +1,32 @@
+/* { dg-do assemble } */
+/* { dg-options "-O2 -mno-sse -mtune=generic -save-temps" } */
+/* Keep labels and directives ('.cfi_startproc', '.cfi_endproc'). */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
+
+/*
+**bar:
+**...
+**.L[0-9]+:
+** movl %edx, %eax
+** addl \$32, %edx
+** movq %gs:m\(%rax\), %r9
+** movq %gs:m\+8\(%rax\), %r8
+** movq %gs:m\+16\(%rax\), %rsi
+** movq %gs:m\+24\(%rax\), %rcx
+** movq %r9, \(%rdi,%rax\)
+** movq %r8, 8\(%rdi,%rax\)
+** movq %rsi, 16\(%rdi,%rax\)
+** movq %rcx, 24\(%rdi,%rax\)
+** cmpl \$224, %edx
+** jb .L[0-9]+
+**...
+*/
+
+typedef unsigned long uword __attribute__ ((mode (word)));
+
+struct a { uword arr[30]; };
+
+__seg_gs struct a m;
+void bar (struct a *dst) { *dst = m; }
+
+/* { dg-final { scan-assembler-not "rep movs" } } */