Re: [PATCH] PR tree-optimization/101895: Fold VEC_PERM to help recognize FMA.

2022-03-15 Thread Richard Biener via Gcc-patches
Original Message- > > From: Richard Biener > > Sent: 14 March 2022 07:38 > > To: GCC Patches > > Cc: Roger Sayle ; Marc Glisse > > > > Subject: Re: [PATCH] PR tree-optimization/101895: Fold VEC_PERM to help > > recognize FMA. > > > >

RE: [PATCH] PR tree-optimization/101895: Fold VEC_PERM to help recognize FMA.

2022-03-15 Thread Roger Sayle
arget/i386/pr101895.c: New test case. Thanks in advance, Roger -- > -Original Message- > From: Richard Biener > Sent: 14 March 2022 07:38 > To: GCC Patches > Cc: Roger Sayle ; Marc Glisse > > Subject: Re: [PATCH] PR tree-optimization/101895: Fold VEC_PERM to help >

Re: [PATCH] PR tree-optimization/101895: Fold VEC_PERM to help recognize FMA.

2022-03-14 Thread Richard Biener via Gcc-patches
On Sun, Mar 13, 2022 at 12:39 AM Marc Glisse via Gcc-patches wrote: > > On Fri, 11 Mar 2022, Roger Sayle wrote: > > +(match vec_same_elem_p > + CONSTRUCTOR@0 > + (if (uniform_vector_p (TREE_CODE (@0) == SSA_NAME > +? gimple_assign_rhs1 (SSA_NAME_DEF_STMT (@0)) : > @0

Re: [PATCH] PR tree-optimization/101895: Fold VEC_PERM to help recognize FMA.

2022-03-12 Thread Marc Glisse via Gcc-patches
On Fri, 11 Mar 2022, Roger Sayle wrote: +(match vec_same_elem_p + CONSTRUCTOR@0 + (if (uniform_vector_p (TREE_CODE (@0) == SSA_NAME +? gimple_assign_rhs1 (SSA_NAME_DEF_STMT (@0)) : @0 Ah, I didn't remember we needed that, we don't seem to be very consistent about i

[PATCH] PR tree-optimization/101895: Fold VEC_PERM to help recognize FMA.

2022-03-11 Thread Roger Sayle
This patch resolves PR tree-optimization/101895 a missed optimization regression, by adding a constant folding simplification to match.pd to simplify the transform "mult; vec_perm; plus" into "vec_perm; mult; plus" with the aim that keeping the multiplication and addition next to each other allows