public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Tobias Burnus <burnus@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/omp/gcc-11] testsuite: Use sync_long_long instead of sync_int_long for atomic-29.c test Date: Tue, 14 Sep 2021 09:33:55 +0000 (GMT) [thread overview] Message-ID: <20210914093355.3311C3857C66@sourceware.org> (raw) https://gcc.gnu.org/g:8496ceda5757581281ed21419eb360e1e07cdd59 commit 8496ceda5757581281ed21419eb360e1e07cdd59 Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Sep 14 11:32:46 2021 +0200 testsuite: Use sync_long_long instead of sync_int_long for atomic-29.c test As discussed, the test tests atomics on doubles which are 64-bit and so we should use sync_long_long effective target instead of sync_int_long that covers 64-bit atomics only on 64-bit arches. I've added -march=pentium to follow what is documented for sync_long_long, I guess -march=zarch should be added for s390* too, but haven't tested that. And using sync_long_long found a syntax error in that effective target implementation, so I've fixed that too. 2021-09-14 Jakub Jelinek <jakub@redhat.com> * c-c++-common/gomp/atomic-29.c: Add -march=pentium dg-additional-options for ia32. Use sync_long_long effective target instead of sync_int_long. * lib/target-supports.exp (check_effective_target_sync_long_long): Fix a syntax error. (cherry picked from commit b29fc21482c0e203136eb5d44bdc1495de3918c6) Diff: --- gcc/testsuite/ChangeLog.omp | 11 +++++++++++ gcc/testsuite/c-c++-common/gomp/atomic-29.c | 11 ++++++----- gcc/testsuite/lib/target-supports.exp | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/ChangeLog.omp b/gcc/testsuite/ChangeLog.omp index 78e5ef10408..24c41e7b093 100644 --- a/gcc/testsuite/ChangeLog.omp +++ b/gcc/testsuite/ChangeLog.omp @@ -1,3 +1,14 @@ +2021-09-14 Tobias Burnus <tobias@codesourcery.com> + + Backported from master: + 2021-09-14 Jakub Jelinek <jakub@redhat.com> + + * c-c++-common/gomp/atomic-29.c: Add -march=pentium + dg-additional-options for ia32. Use sync_long_long effective target + instead of sync_int_long. + * lib/target-supports.exp (check_effective_target_sync_long_long): Fix + a syntax error. + 2021-09-13 Tobias Burnus <tobias@codesourcery.com> Backported from master: diff --git a/gcc/testsuite/c-c++-common/gomp/atomic-29.c b/gcc/testsuite/c-c++-common/gomp/atomic-29.c index e574c48fd55..97fe33b3927 100644 --- a/gcc/testsuite/c-c++-common/gomp/atomic-29.c +++ b/gcc/testsuite/c-c++-common/gomp/atomic-29.c @@ -1,10 +1,11 @@ /* { dg-do compile { target c } } */ /* { dg-additional-options "-O2 -fdump-tree-ompexp" } */ -/* { dg-final { scan-tree-dump-times "\.ATOMIC_COMPARE_EXCHANGE \\\(\[^\n\r]*, 8, 5, 5\\\);" 1 "ompexp" { target sync_int_long } } } */ -/* { dg-final { scan-tree-dump-times "\.ATOMIC_COMPARE_EXCHANGE \\\(\[^\n\r]*, 8, 4, 2\\\);" 1 "ompexp" { target sync_int_long } } } */ -/* { dg-final { scan-tree-dump-times "\.ATOMIC_COMPARE_EXCHANGE \\\(\[^\n\r]*, 264, 5, 0\\\);" 1 "ompexp" { target sync_int_long } } } */ -/* { dg-final { scan-tree-dump-times "\.ATOMIC_COMPARE_EXCHANGE \\\(\[^\n\r]*, 8, 0, 0\\\);" 1 "ompexp" { target sync_int_long } } } */ -/* { dg-final { scan-tree-dump-not "__atomic_load_8 \\\(" "ompexp" { target sync_int_long } } } */ +/* { dg-additional-options "-march=pentium" { target ia32 } } */ +/* { dg-final { scan-tree-dump-times "\.ATOMIC_COMPARE_EXCHANGE \\\(\[^\n\r]*, 8, 5, 5\\\);" 1 "ompexp" { target sync_long_long } } } */ +/* { dg-final { scan-tree-dump-times "\.ATOMIC_COMPARE_EXCHANGE \\\(\[^\n\r]*, 8, 4, 2\\\);" 1 "ompexp" { target sync_long_long } } } */ +/* { dg-final { scan-tree-dump-times "\.ATOMIC_COMPARE_EXCHANGE \\\(\[^\n\r]*, 264, 5, 0\\\);" 1 "ompexp" { target sync_long_long } } } */ +/* { dg-final { scan-tree-dump-times "\.ATOMIC_COMPARE_EXCHANGE \\\(\[^\n\r]*, 8, 0, 0\\\);" 1 "ompexp" { target sync_long_long } } } */ +/* { dg-final { scan-tree-dump-not "__atomic_load_8 \\\(" "ompexp" { target sync_long_long } } } */ double x; diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 45d34e1a58e..723c8eadbd9 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -7972,7 +7972,7 @@ proc check_effective_target_sync_int_128_runtime { } { # Note: 32bit s390 targets require -mzarch in dg-options. proc check_effective_target_sync_long_long { } { - if { [istarget i?86-*-*] || [istarget x86_64-*-*]) + if { [istarget i?86-*-*] || [istarget x86_64-*-*] || [istarget aarch64*-*-*] || [istarget arm*-*-*] || [istarget alpha*-*-*]
reply other threads:[~2021-09-14 9:33 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210914093355.3311C3857C66@sourceware.org \ --to=burnus@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).