From: Thomas Schwinge <tschwinge@baylibre.com>
To: Andrew Stubbs <ams@baylibre.com>, Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: GCN RDNA2+ vs. GCC SLP vectorizer (was: [committed] amdgcn: add -march=gfx1030 EXPERIMENTAL)
Date: Fri, 16 Feb 2024 10:52:54 +0100 [thread overview]
Message-ID: <87ttm8ka6h.fsf@euler.schwinge.ddns.net> (raw)
In-Reply-To: <b99badf1-895a-4ff1-b68f-abc665a85625@codesourcery.com>
Hi!
On 2023-10-20T12:51:03+0100, Andrew Stubbs <ams@codesourcery.com> wrote:
> I've committed this patch
... as commit c7ec7bd1c6590cf4eed267feab490288e0b8d691
"amdgcn: add -march=gfx1030 EXPERIMENTAL", which the later RDNA3/gfx1100
support builds on top of, and that's what I'm currently working on
getting proper GCC/GCN target (not offloading) results for.
Now looking at 'gcc.dg/vect/bb-slp-cond-1.c', which is reasonably simple,
and hopefully representative for other SLP execution test FAILs
(regressions compared to my earlier non-gfx1100 testing).
$ build-gcc/gcc/xgcc -Bbuild-gcc/gcc/ source-gcc/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c --sysroot=install/amdgcn-amdhsa -ftree-vectorize -fno-tree-loop-distribute-patterns -fno-vect-cost-model -fno-common -O2 -fdump-tree-slp-details -fdump-tree-vect-details -isystem build-gcc/amdgcn-amdhsa/gfx1100/newlib/targ-include -isystem source-gcc/newlib/libc/include -Bbuild-gcc/amdgcn-amdhsa/gfx1100/newlib/ -Lbuild-gcc/amdgcn-amdhsa/gfx1100/newlib -wrapper setarch,--addr-no-randomize -fdump-tree-all-all -fdump-ipa-all-all -fdump-rtl-all-all -save-temps -march=gfx1100
The '-march=gfx1030' 'a-bb-slp-cond-1.s' is identical (apart from
'TARGET_PACKED_WORK_ITEMS' in 'gcn_target_asm_function_prologue'), so I
suppose will also exhibit the same failure mode, once again?
Compared to '-march=gfx90a', the differences begin in
'a-bb-slp-cond-1.c.266r.expand' (only!), down to 'a-bb-slp-cond-1.s'.
Changed like:
@@ -38,10 +38,10 @@ int main ()
#pragma GCC novector
for (i = 1; i < N; i++)
if (a[i] != i%4 + 1)
- abort ();
+ __builtin_printf("%d %d != %d\n", i, a[i], i%4 + 1);
if (a[0] != 5)
- abort ();
+ __builtin_printf("%d %d != %d\n", 0, a[0], 5);
..., we see:
$ flock /tmp/gcn.lock build-gcc/gcc/gcn-run a.out
40 5 != 1
41 6 != 2
42 7 != 3
43 8 != 4
44 5 != 1
45 6 != 2
46 7 != 3
47 8 != 4
'40..47' are the 'i = 10..11' in 'foo', and the expectation is
'a[i * stride + 0..3] != 0'. So, either some earlier iteration has
scribbled zero values over these (vector lane masking issue, perhaps?),
or some other code generation issue?
Grüße
Thomas
next prev parent reply other threads:[~2024-02-16 9:53 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 11:51 [committed] amdgcn: add -march=gfx1030 EXPERIMENTAL Andrew Stubbs
2023-10-27 17:06 ` Andrew Stubbs
2024-01-29 10:34 ` [patch] gcn/gcn-valu.md: Disable fold_left_plus for TARGET_RDNA2_PLUS [PR113615] Tobias Burnus
2024-01-29 12:34 ` Andrew Stubbs
2024-01-29 12:50 ` Tobias Burnus
2024-01-29 15:17 ` Andrew Stubbs
2024-02-16 14:34 ` GCN: Conditionalize 'define_expand "reduc_<fexpander>_scal_<mode>"' on '!TARGET_RDNA2_PLUS' [PR113615] (was: [patch] gcn/gcn-valu.md: Disable fold_left_plus for TARGET_RDNA2_PLUS [PR113615]) Thomas Schwinge
2024-02-16 14:39 ` GCN: Conditionalize 'define_expand "reduc_<fexpander>_scal_<mode>"' on '!TARGET_RDNA2_PLUS' [PR113615] Andrew Stubbs
2024-02-12 16:35 ` GCN RDNA2+ vs. GCC vectorizer "Reduce using vector shifts" (was: [committed] amdgcn: add -march=gfx1030 EXPERIMENTAL) Thomas Schwinge
2024-02-13 8:26 ` Richard Biener
2024-02-14 12:56 ` GCN RDNA2+ vs. GCC vectorizer "Reduce using vector shifts" Andrew Stubbs
2024-02-14 13:27 ` Richard Biener
2024-02-14 13:40 ` Andrew Stubbs
2024-02-14 13:43 ` Richard Biener
2024-02-14 15:23 ` Andrew Stubbs
2024-02-15 7:49 ` Richard Biener
2024-02-15 10:03 ` Andrew Stubbs
2024-02-15 10:21 ` Richard Biener
2024-02-15 10:59 ` Andrew Stubbs
2024-02-15 12:31 ` Richard Biener
2024-02-15 10:23 ` Thomas Schwinge
2024-02-15 13:02 ` Andrew Stubbs
2024-02-16 9:52 ` Thomas Schwinge [this message]
2024-02-16 10:17 ` GCN RDNA2+ vs. GCC SLP vectorizer (was: [committed] amdgcn: add -march=gfx1030 EXPERIMENTAL) Richard Biener
2024-02-16 11:22 ` GCN RDNA2+ vs. GCC SLP vectorizer Andrew Stubbs
2024-02-16 12:26 ` Richard Biener
2024-02-16 12:41 ` Andrew Stubbs
2024-02-16 13:53 ` Thomas Schwinge
2024-02-19 10:38 ` Thomas Schwinge
2024-02-19 10:52 ` Richard Biener
2024-02-19 16:31 ` Thomas Schwinge
2024-02-19 16:35 ` Thomas Schwinge
2024-02-20 7:44 ` Richard Biener
2024-02-20 8:46 ` Thomas Schwinge
2024-02-20 9:13 ` Richard Biener
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=87ttm8ka6h.fsf@euler.schwinge.ddns.net \
--to=tschwinge@baylibre.com \
--cc=ams@baylibre.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/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: link
Be 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).