Re: [PATCH 1/2] Mid engine setup [SU]ABDL

2023-06-30 Thread Richard Sandiford via Gcc-patches
Oluwatamilore Adebayo writes: > From: oluade01 > > This updates vect_recog_abd_pattern to recognize the widening > variant of absolute difference (ABDL, ABDL2). > > gcc/ChangeLog: > > * internal-fn.cc (widening_fn_p, decomposes_to_hilo_fn_p): > Add IFN_VEC_WIDEN_ABD to the switch

[PATCH 1/2] Mid engine setup [SU]ABDL

2023-06-30 Thread Oluwatamilore Adebayo via Gcc-patches
From: oluade01 This updates vect_recog_abd_pattern to recognize the widening variant of absolute difference (ABDL, ABDL2). gcc/ChangeLog: * internal-fn.cc (widening_fn_p, decomposes_to_hilo_fn_p): Add IFN_VEC_WIDEN_ABD to the switch statement. * internal-fn.def

Re: [PATCH 1/2] Mid engine setup [SU]ABDL

2023-06-30 Thread Oluwatamilore Adebayo via Gcc-patches
> Sorry, my fault. I was using the original type names in this > suggestion, rather than the TYPE1…TYPE5 ones. Should be: > >WIDEN_ABD exists to optimize the case where TYPE4 is at least >twice as wide as TYPE3. Change made. > Lingering use of “L” suffixes here. Maybe: > >

Re: [PATCH 1/2] Mid engine setup [SU]ABDL

2023-06-29 Thread Richard Sandiford via Gcc-patches
Oluwatamilore Adebayo writes: > From: oluade01 > > This updates vect_recog_abd_pattern to recognize the widening > variant of absolute difference (ABDL, ABDL2). > > gcc/ChangeLog: > > * internal-fn.cc (widening_fn_p, decomposes_to_hilo_fn_p): > Add IFN_VEC_WIDEN_ABD to the switch

[PATCH 1/2] Mid engine setup [SU]ABDL

2023-06-28 Thread Oluwatamilore Adebayo via Gcc-patches
From: oluade01 This updates vect_recog_abd_pattern to recognize the widening variant of absolute difference (ABDL, ABDL2). gcc/ChangeLog: * internal-fn.cc (widening_fn_p, decomposes_to_hilo_fn_p): Add IFN_VEC_WIDEN_ABD to the switch statement. * internal-fn.def

Re: [PATCH 1/2] Mid engine setup [SU]ABDL

2023-06-28 Thread Oluwatamilore Adebayo via Gcc-patches
> The new optabs need to be documented in doc/md.texi. Done. > “Long” is a bit of an architecture-specific term. Maybe just: > >Try to find the following ABsolute Difference (ABD) or >widening ABD (WIDEN_ABD) pattern: Change made. > >> - VTYPE x, y, out; > >> + VTYPE x, y; >

Re: [PATCH 1/2] Mid engine setup [SU]ABDL

2023-06-27 Thread Richard Sandiford via Gcc-patches
Richard Sandiford writes: >> - VTYPE x, y, out; >> + VTYPE x, y; >> + WTYPE out; >> type diff; >> loop i in range: >> S1 diff = x[i] - y[i] >> S2 out[i] = ABS_EXPR ; >> >> - where 'type' is a integer and 'VTYPE' is a vector of integers >> - the same size as

Re: [PATCH 1/2] Mid engine setup [SU]ABDL

2023-06-26 Thread Richard Sandiford via Gcc-patches
Thanks for doing this. Generally looks good, but some comments below. Oluwatamilore Adebayo writes: > From: oluade01 > > This updates vect_recog_abd_pattern to recognize the widening > variant of absolute difference (ABDL, ABDL2). > > gcc/ChangeLog: > > * internal-fn.cc (widening_fn_p,

[PATCH 1/2] Mid engine setup [SU]ABDL

2023-06-26 Thread Oluwatamilore Adebayo via Gcc-patches
From: oluade01 This updates vect_recog_abd_pattern to recognize the widening variant of absolute difference (ABDL, ABDL2). gcc/ChangeLog: * internal-fn.cc (widening_fn_p, decomposes_to_hilo_fn_p): Add IFN_VEC_WIDEN_ABD to the switch statement. * internal-fn.def