* [committed] testsuite: Add testcase for already fixed PR [PR109362]
@ 2023-04-01 7:04 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2023-04-01 7:04 UTC (permalink / raw)
To: gcc-patches
Hi!
This PR got fixed with r13-137.
Add a testcase to make sure it doesn't reappear.
Regtested on x86_64-linux and i686-linux, committed to trunk as obvious.
2023-04-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/109362
* gcc.target/i386/pr109362.c: New test.
--- gcc/testsuite/gcc.target/i386/pr109362.c.jj 2023-03-31 17:36:08.396428411 +0200
+++ gcc/testsuite/gcc.target/i386/pr109362.c 2023-03-31 17:35:49.768696966 +0200
@@ -0,0 +1,19 @@
+/* PR tree-optimization/109362 */
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2 -masm=att" } */
+/* Ensure we don't waste a register set to %rdi + 8. */
+/* { dg-final { scan-assembler "\tmovq\t\\\(%rdi\\\), %r" } } */
+/* { dg-final { scan-assembler "\tmovq\t8\\\(%rdi\\\), %r" } } */
+
+struct S { long a, b; };
+
+int
+foo (struct S *v)
+{
+ while (1)
+ {
+ __atomic_load_n (&v->a, __ATOMIC_ACQUIRE);
+ if (__atomic_load_n (&v->b, __ATOMIC_ACQUIRE))
+ return 1;
+ }
+}
Jakub
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-01 7:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-01 7:04 [committed] testsuite: Add testcase for already fixed PR [PR109362] Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).