This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64] Testcase fix for __ATOMIC_CONSUME
- From: Alex Velenko <Alex dot Velenko at arm dot com>
- To: Mike Stump <mikestump at comcast dot net>, Torvald Riegel <triegel at redhat dot com>
- Cc: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Wed, 18 Feb 2015 15:43:41 +0000
- Subject: Re: [PATCH][AArch64] Testcase fix for __ATOMIC_CONSUME
- Authentication-results: sourceware.org; auth=none
- References: <1422375847-18680-1-git-send-email-alex dot velenko at arm dot com> <A97E3995-549C-4A0B-B6A3-1207917FCC8F at comcast dot net> <CAFqB+PyB_qHHLmzzmx9QVsRkaS8JKYOzYwiZP2D0qxrXDa=uDw at mail dot gmail dot com> <58101C4C-374A-43E5-B255-C97CE3046A2C at comcast dot net> <54D8CE31 dot 6090503 at arm dot com> <5E4FFEE7-1846-4915-A613-DD8926252C12 at comcast dot net> <1423685805 dot 9778 dot 304 dot camel at triegel dot csb> <E6E5D37C-9352-47A4-825D-6D8F1F95697F at comcast dot net>
On 12/02/15 18:38, Mike Stump wrote:
On Feb 11, 2015, at 12:16 PM, Torvald Riegel <triegel@redhat.com> wrote:
On Mon, 2015-02-09 at 09:10 -0800, Mike Stump wrote:
On Feb 9, 2015, at 7:11 AM, Alex Velenko <Alex.Velenko@arm.com> wrote:
The following patch makes atomic-op-consume.c XFAIL
Is this patch ok?
Ok.
I’d shorten the comment above the xfail to be exceedingly short:
/* PR59448 consume not implemented yet */
The reason is the brain can process this about 8x faster. Also, one can cut and paste the PR part into a web browser directly, or, if you have an electric bugzilla mode for emacs, it will pop right up. */
Given the discussions we had in ISO C++ SG1, it seems the only way to
fix memory_order_consume is to deprecate it (or let it rot forever), and
add something else to the standard. See
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4321.pdf
Nice paper, thanks.
IOW, I believe the promotion is here to stay. I'm not aware of any
other implementation doing something else.
Thus, XFAIL doesn't seem right to me.
Since Jakub in PR64930 updated to the now expected output instead of xfail, and given the paper above, easy to agree with this. The changes to remove the xfail and expect the now expected codegen are pre-approved.
Hi Mike,
As pre-approved trivial change, on Monday I commited the following patch:
gcc/testsuite/
2015-02-16 Alex Velenko <Alex.Velenko@arm.com>
* gcc.target/aarch64/atomic-op-consume.c (scan-assember-times):
Directive adjusted to scan for ldaxr.
* gcc.target/arm/atomic-op-consume.c (scan-assember-times): Directive
adjusted to scan for ldaex.
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c
b/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c
index 0e6dbbe..26ebbdf 100644
--- a/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c
@@ -3,6 +3,6 @@
#include "atomic-op-consume.x"
-/* PR59448 consume not implemented yet. */
-/* { dg-final { scan-assembler-times "ldxr\tw\[0-9\]+,
\\\[x\[0-9\]+\\\]" 6 { xfail *-*-* } } } */
+/* Scan for ldaxr is a PR59448 consume workaround. */
+/* { dg-final { scan-assembler-times "ldaxr\tw\[0-9\]+,
\\\[x\[0-9\]+\\\]" 6 } } */
/* { dg-final { scan-assembler-times "stxr\tw\[0-9\]+, w\[0-9\]+,
\\\[x\[0-9\]+\\\]" 6 } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-consume.c
b/gcc/testsuite/gcc.target/arm/atomic-op-consume.c
index fafe4d6..6c5f989 100644
--- a/gcc/testsuite/gcc.target/arm/atomic-op-consume.c
+++ b/gcc/testsuite/gcc.target/arm/atomic-op-consume.c
@@ -5,7 +5,7 @@
#include "../aarch64/atomic-op-consume.x"
-/* PR59448 consume not implemented yet. */
-/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+,
\\\[r\[0-9\]+\\\]" 6 { xfail *-*-* } } } */
+/* Scan for ldaex is a PR59448 consume workaround. */
+/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+,
\\\[r\[0-9\]+\\\]" 6 } } */
/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+,
\\\[r\[0-9\]+\\\]" 6 } } */
/* { dg-final { scan-assembler-not "dmb" } } */