On Mon, 9 Oct 2023, Juzhe-Zhong wrote: > Reference: https://godbolt.org/z/G9jzf5Grh > > RVV is able to vectorize this case using SLP. However, with > -fno-vect-cost-model, RVV vectorize it by vec_load_lanes with stride 6.
OK. Note load/store-lanes is specifically pre-empting SLP if all loads/stores of a SLP intance can support that. Not sure if this heuristic is good for load/store lanes with high stride? > gcc/testsuite/ChangeLog: > > * gcc.dg/vect/fast-math-slp-38.c: Add ! vect_strided6. > > --- > gcc/testsuite/gcc.dg/vect/fast-math-slp-38.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/testsuite/gcc.dg/vect/fast-math-slp-38.c > b/gcc/testsuite/gcc.dg/vect/fast-math-slp-38.c > index 7c7acd5bab6..96751faae7f 100644 > --- a/gcc/testsuite/gcc.dg/vect/fast-math-slp-38.c > +++ b/gcc/testsuite/gcc.dg/vect/fast-math-slp-38.c > @@ -18,4 +18,4 @@ foo (void) > } > > /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ > -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" > } } */ > +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" > { target { ! vect_strided6 } } } } */ > -- Richard Biener <rguent...@suse.de> SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)