Am Tue, Apr 09, 2024 at 05:01:18PM +0200 schrieb Andreas Krebbel:
> On 4/9/24 16:31, Juergen Christ wrote:
> > Loop vectorizer can generate vector permutes with constant indexes
> > where all indexes are equal.  Optimize this case to use vector
> > replicate instead of vector permute.
> > 
> > gcc/ChangeLog:
> > 
> >     * config/s390/s390.cc (expand_perm_as_replicate): Implement.
> >     (vectorize_vec_perm_const_1): Call new function.
> >     * config/s390/vx-builtins.md (vec_splat<mode>): Change to...
> >     (@vec_splat<mode>): ...this.
> > 
> > gcc/testsuite/ChangeLog:
> > 
> >     * gcc.target/s390/vector/vec-expand-replicate.c: New test.
> > 
> > Bootstrapped and regtested on s390x.  Ok for trunk?
> 
> Does this also work when using the vec_perm intrinsic or would we need to 
> define a matching RTX for
> that?

Unfortunately, it does not work with vec_perm.

> Ok. Thanks!

Pushed.

Juergen

Reply via email to