Re: [PATCH] s390x: Optimize vector permute with constant indexes

2024-04-09 Thread Juergen Christ
Am Tue, Apr 09, 2024 at 11:51:00AM +0200 schrieb Stefan Schulze Frielinghaus: > > +static bool expand_perm_as_replicate (const struct expand_vec_perm_d &d) >^~~~ > Function names start on a new line. Fixed > > +{ > > + unsigned char i; > > + unsigned char ele

Re: [PATCH] s390x: Optimize vector permute with constant indexes

2024-04-09 Thread Stefan Schulze Frielinghaus
On Tue, Apr 02, 2024 at 09:56:01AM +0200, 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_p

[PATCH] s390x: Optimize vector permute with constant indexes

2024-04-02 Thread Juergen Christ
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