Hi! On 2024-10-03T13:34:47+0200, Richard Biener <rguent...@suse.de> wrote: > On Thu, 3 Oct 2024, Thomas Schwinge wrote: >> On 2024-09-06T11:30:06+0200, Richard Biener <rguent...@suse.de> wrote: >> > On Thu, 5 Sep 2024, Richard Biener wrote: >> >> The following enables single-lane loop SLP discovery for non-grouped >> >> stores >> >> and adjusts vectorizable_store to properly handle those. >> >> > I have now pushed this as r15-3509-gd34cda72098867 >> >> >> --- a/gcc/testsuite/gcc.dg/vect/slp-26.c >> >> +++ b/gcc/testsuite/gcc.dg/vect/slp-26.c >> >> @@ -50,4 +50,5 @@ int main (void) >> >> /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { >> >> target { ! { mips_msa || { amdgcn-*-* || { riscv_v || loongarch_sx } } } >> >> } } } } */ >> >> /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { >> >> target { mips_msa || { amdgcn-*-* || { riscv_v || loongarch_sx } } } } } >> >> } */ >> >> /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 >> >> "vect" { target { ! { mips_msa || { amdgcn-*-* || { riscv_v || >> >> loongarch_sx } } } } } } } */ >> >> -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 >> >> "vect" { target { mips_msa || { amdgcn-*-* || { riscv_v || loongarch_sx } >> >> } } } } } */ >> >> +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 >> >> "vect" { target { mips_msa || { amdgcn-*-* || loongarch_sx } } } } } */ >> >> +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 >> >> "vect" { target riscv_v } } } */ >> >> For '--target=amdgcn-amdhsa' (tested '-march=gfx908', '-march=gfx1100'), >> I see: >> >> PASS: gcc.dg/vect/slp-26.c (test for excess errors) >> PASS: gcc.dg/vect/slp-26.c execution test >> PASS: gcc.dg/vect/slp-26.c scan-tree-dump-times vect "vectorized 1 >> loops" 1 >> [-PASS:-]{+FAIL:+} gcc.dg/vect/slp-26.c scan-tree-dump-times vect >> "vectorizing stmts using SLP" 1 >> >> gcc.dg/vect/slp-26.c: pattern found 2 times >> >> ..., so I suppose I'll apply the same change to 'amdgcn-*-*' as you did >> to 'riscv_v'? > > I guess yes
Pushed to trunk branch commit b137e4bbcc488b44a037baad62a8da90659d7468 "Handle non-grouped stores as single-lane SLP: adjust 'gcc.dg/vect/slp-26.c', GCN", see attached. Grüße Thomas > I don't remember exactly the reason but IIRC it's about the > unsigned division which gcn might also be able to do - the 32817 > value is explicitly excluded from pattern recognition. We don't have > an effective target for unsigned [short] integer division. > > Richard.
>From b137e4bbcc488b44a037baad62a8da90659d7468 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <tschwi...@baylibre.com> Date: Thu, 3 Oct 2024 12:52:30 +0200 Subject: [PATCH] Handle non-grouped stores as single-lane SLP: adjust 'gcc.dg/vect/slp-26.c', GCN As of commit d34cda720988674bcf8a24267c9e1ec61335d6de "Handle non-grouped stores as single-lane SLP", we see for '--target=amdgcn-amdhsa' (tested '-march=gfx908', '-march=gfx1100'): PASS: gcc.dg/vect/slp-26.c (test for excess errors) PASS: gcc.dg/vect/slp-26.c execution test PASS: gcc.dg/vect/slp-26.c scan-tree-dump-times vect "vectorized 1 loops" 1 [-PASS:-]{+FAIL:+} gcc.dg/vect/slp-26.c scan-tree-dump-times vect "vectorizing stmts using SLP" 1 gcc.dg/vect/slp-26.c: pattern found 2 times Apply the same change to 'amdgcn-*-*' as done for 'riscv_v'. gcc/testsuite/ * gcc.dg/vect/slp-26.c: Adjust GCN. --- gcc/testsuite/gcc.dg/vect/slp-26.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/vect/slp-26.c b/gcc/testsuite/gcc.dg/vect/slp-26.c index cdb5d9c694b..23917474ddc 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-26.c +++ b/gcc/testsuite/gcc.dg/vect/slp-26.c @@ -50,5 +50,5 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { target { ! { mips_msa || { amdgcn-*-* || { riscv_v || loongarch_sx } } } } } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { mips_msa || { amdgcn-*-* || { riscv_v || loongarch_sx } } } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target { ! { mips_msa || { amdgcn-*-* || { riscv_v || loongarch_sx } } } } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { mips_msa || { amdgcn-*-* || loongarch_sx } } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target riscv_v } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { mips_msa || loongarch_sx } } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target { riscv_v || amdgcn-*-* } } } } */ -- 2.34.1