Re: [match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-24 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 24 Apr 2023 at 15:02, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > gcc/ChangeLog: > > * tree-ssa-forwprop.cc (is_combined_permutation_identity): Try to > > simplify two successive VEC_PERM_EXPRs with single operand and same > > mask, where mask chooses el

Re: [match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-24 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > gcc/ChangeLog: > * tree-ssa-forwprop.cc (is_combined_permutation_identity): Try to > simplify two successive VEC_PERM_EXPRs with single operand and same > mask, where mask chooses elements in reverse order. > > gcc/testesuite/ChangeLog: > * gcc

Re: [match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-22 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 21 Apr 2023 at 21:57, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Wed, 19 Apr 2023 at 16:17, Richard Biener > > wrote: > >> > >> On Wed, Apr 19, 2023 at 11:21 AM Prathamesh Kulkarni > >> wrote: > >> > > >> > On Tue, 11 Apr 2023 at 19:36, Prathamesh Kulkarni > >> >

Re: [match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-21 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > On Wed, 19 Apr 2023 at 16:17, Richard Biener > wrote: >> >> On Wed, Apr 19, 2023 at 11:21 AM Prathamesh Kulkarni >> wrote: >> > >> > On Tue, 11 Apr 2023 at 19:36, Prathamesh Kulkarni >> > wrote: >> > > >> > > On Tue, 11 Apr 2023 at 14:17, Richard Biener >> > > w

Re: [match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-19 Thread Richard Biener via Gcc-patches
On Wed, Apr 19, 2023 at 2:20 PM Prathamesh Kulkarni wrote: > > On Wed, 19 Apr 2023 at 16:17, Richard Biener > wrote: > > > > On Wed, Apr 19, 2023 at 11:21 AM Prathamesh Kulkarni > > wrote: > > > > > > On Tue, 11 Apr 2023 at 19:36, Prathamesh Kulkarni > > > wrote: > > > > > > > > On Tue, 11 Apr

Re: [match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-19 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 19 Apr 2023 at 16:17, Richard Biener wrote: > > On Wed, Apr 19, 2023 at 11:21 AM Prathamesh Kulkarni > wrote: > > > > On Tue, 11 Apr 2023 at 19:36, Prathamesh Kulkarni > > wrote: > > > > > > On Tue, 11 Apr 2023 at 14:17, Richard Biener > > > wrote: > > > > > > > > On Wed, Apr 5, 2023 a

Re: [match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-19 Thread Richard Biener via Gcc-patches
On Wed, Apr 19, 2023 at 11:21 AM Prathamesh Kulkarni wrote: > > On Tue, 11 Apr 2023 at 19:36, Prathamesh Kulkarni > wrote: > > > > On Tue, 11 Apr 2023 at 14:17, Richard Biener > > wrote: > > > > > > On Wed, Apr 5, 2023 at 10:39 AM Prathamesh Kulkarni via Gcc-patches > > > wrote: > > > > > > >

Re: [match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-19 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 11 Apr 2023 at 19:36, Prathamesh Kulkarni wrote: > > On Tue, 11 Apr 2023 at 14:17, Richard Biener > wrote: > > > > On Wed, Apr 5, 2023 at 10:39 AM Prathamesh Kulkarni via Gcc-patches > > wrote: > > > > > > Hi, > > > For the following test: > > > > > > svint32_t f(svint32_t v) > > > { >

Re: [match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-11 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 11 Apr 2023 at 14:17, Richard Biener wrote: > > On Wed, Apr 5, 2023 at 10:39 AM Prathamesh Kulkarni via Gcc-patches > wrote: > > > > Hi, > > For the following test: > > > > svint32_t f(svint32_t v) > > { > > return svrev_s32 (svrev_s32 (v)); > > } > > > > We generate 2 rev instructions

Re: [match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-11 Thread Richard Biener via Gcc-patches
On Wed, Apr 5, 2023 at 10:39 AM Prathamesh Kulkarni via Gcc-patches wrote: > > Hi, > For the following test: > > svint32_t f(svint32_t v) > { > return svrev_s32 (svrev_s32 (v)); > } > > We generate 2 rev instructions instead of nop: > f: > rev z0.s, z0.s > rev z0.s, z0.s

[match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-05 Thread Prathamesh Kulkarni via Gcc-patches
Hi, For the following test: svint32_t f(svint32_t v) { return svrev_s32 (svrev_s32 (v)); } We generate 2 rev instructions instead of nop: f: rev z0.s, z0.s rev z0.s, z0.s ret The attached patch tries to fix that by trying to recognize the following pattern in ma