Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-06-06 Thread Jakub Jelinek via Gcc-patches
On Thu, Jun 01, 2023 at 05:27:56PM +0100, Andre Vieira (lists) via Gcc-patches wrote: > --- a/gcc/internal-fn.h > +++ b/gcc/internal-fn.h > @@ -20,6 +20,10 @@ along with GCC; see the file COPYING3. If not see > #ifndef GCC_INTERNAL_FN_H > #define GCC_INTERNAL_FN_H > > +#include

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-06-02 Thread Richard Sandiford via Gcc-patches
Just some very minor things. "Andre Vieira (lists)" writes: > diff --git a/gcc/internal-fn.cc b/gcc/internal-fn.cc > index > 5c9da73ea11f8060b18dcf513599c9694fa4f2ad..348bee35a35ae4ed9a8652f5349f430c2733e1cb > 100644 > --- a/gcc/internal-fn.cc > +++ b/gcc/internal-fn.cc > @@ -90,6 +90,71 @@

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-06-01 Thread Andre Vieira (lists) via Gcc-patches
Hi, This is the updated patch and cover letter. Patches for inline and gimple-op changes will follow soon. DEF_INTERNAL_WIDENING_OPTAB_FN and DEF_INTERNAL_NARROWING_OPTAB_FN are like DEF_INTERNAL_SIGNED_OPTAB_FN and DEF_INTERNAL_OPTAB_FN respectively. With the exception that they

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-22 Thread Richard Biener via Gcc-patches
On Thu, 18 May 2023, Andre Vieira (lists) wrote: > How about this? > > Not sure about the DEF_INTERNAL documentation I rewrote in internal-fn.def, > was struggling to word these, so improvements welcome! The even/odd variant optabs are also commutative_optab_p, so is the vec_widen_sadd without

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-18 Thread Andre Vieira (lists) via Gcc-patches
How about this? Not sure about the DEF_INTERNAL documentation I rewrote in internal-fn.def, was struggling to word these, so improvements welcome! gcc/ChangeLog: 2023-04-25 Andre Vieira Joel Hutton Tamar Christina * config/aarch64/aarch64-simd.md

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-15 Thread Richard Biener via Gcc-patches
On Mon, 15 May 2023, Andre Vieira (lists) wrote: > > > On 15/05/2023 12:01, Richard Biener wrote: > > On Mon, 15 May 2023, Richard Sandiford wrote: > > > >> Richard Biener writes: > >>> On Fri, 12 May 2023, Richard Sandiford wrote: > >>> > Richard Biener writes: > > On Fri, 12 May

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-15 Thread Andre Vieira (lists) via Gcc-patches
On 15/05/2023 12:01, Richard Biener wrote: On Mon, 15 May 2023, Richard Sandiford wrote: Richard Biener writes: On Fri, 12 May 2023, Richard Sandiford wrote: Richard Biener writes: On Fri, 12 May 2023, Andre Vieira (lists) wrote: I have dealt with, I think..., most of your comments.

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-15 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Mon, 15 May 2023, Richard Sandiford wrote: > >> Richard Biener writes: >> > But I'm also not sure >> > how much of that is really needed (it seems to be tied around >> > optimizing optabs space?) >> >> Not sure what you mean by "this". Optabs space shouldn't be a

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-15 Thread Richard Biener via Gcc-patches
On Mon, 15 May 2023, Richard Sandiford wrote: > Richard Biener writes: > > On Fri, 12 May 2023, Richard Sandiford wrote: > > > >> Richard Biener writes: > >> > On Fri, 12 May 2023, Andre Vieira (lists) wrote: > >> > > >> >> I have dealt with, I think..., most of your comments. There's quite a

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-15 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Fri, 12 May 2023, Richard Sandiford wrote: > >> Richard Biener writes: >> > On Fri, 12 May 2023, Andre Vieira (lists) wrote: >> > >> >> I have dealt with, I think..., most of your comments. There's quite a few >> >> changes, I think it's all a bit simpler now. I made

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-15 Thread Richard Biener via Gcc-patches
On Fri, 12 May 2023, Richard Sandiford wrote: > Richard Biener writes: > > On Fri, 12 May 2023, Andre Vieira (lists) wrote: > > > >> I have dealt with, I think..., most of your comments. There's quite a few > >> changes, I think it's all a bit simpler now. I made some other changes to > >> the

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-12 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Fri, 12 May 2023, Andre Vieira (lists) wrote: > >> I have dealt with, I think..., most of your comments. There's quite a few >> changes, I think it's all a bit simpler now. I made some other changes to the >> costing in tree-inline.cc and gimple-range-op.cc in which I

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-12 Thread Andre Vieira (lists) via Gcc-patches
On 12/05/2023 14:28, Richard Biener wrote: On Fri, 12 May 2023, Andre Vieira (lists) wrote: I have dealt with, I think..., most of your comments. There's quite a few changes, I think it's all a bit simpler now. I made some other changes to the costing in tree-inline.cc and

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-12 Thread Richard Biener via Gcc-patches
On Fri, 12 May 2023, Andre Vieira (lists) wrote: > I have dealt with, I think..., most of your comments. There's quite a few > changes, I think it's all a bit simpler now. I made some other changes to the > costing in tree-inline.cc and gimple-range-op.cc in which I try to preserve > the same

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-12 Thread Andre Vieira (lists) via Gcc-patches
I have dealt with, I think..., most of your comments. There's quite a few changes, I think it's all a bit simpler now. I made some other changes to the costing in tree-inline.cc and gimple-range-op.cc in which I try to preserve the same behaviour as we had with the tree codes before. Also

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-03 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Fri, 28 Apr 2023, Andre Vieira (lists) wrote: > >> This patch replaces the existing tree_code widen_plus and widen_minus >> patterns with internal_fn versions. >> >> DEF_INTERNAL_OPTAB_HILO_FN is like DEF_INTERNAL_OPTAB_FN except it provides >> convenience wrappers

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-03 Thread Richard Biener via Gcc-patches
On Fri, 28 Apr 2023, Andre Vieira (lists) wrote: > This patch replaces the existing tree_code widen_plus and widen_minus > patterns with internal_fn versions. > > DEF_INTERNAL_OPTAB_HILO_FN is like DEF_INTERNAL_OPTAB_FN except it provides > convenience wrappers for defining conversions that

[PATCH 2/3] Refactor widen_plus as internal_fn

2023-04-28 Thread Andre Vieira (lists) via Gcc-patches
This patch replaces the existing tree_code widen_plus and widen_minus patterns with internal_fn versions. DEF_INTERNAL_OPTAB_HILO_FN is like DEF_INTERNAL_OPTAB_FN except it provides convenience wrappers for defining conversions that require a hi/lo split, like widening and narrowing