@gcc.gnu.org;
juzhe.zh...@rivai.ai; Wang, Yanzhang ;
kito.ch...@gmail.com; jeffreya...@gmail.com
Subject: Re: [PATCH v2] Draft|Internal-fn: Introduce internal fn saturation
US_PLUS
On Thu, Mar 7, 2024 at 2:54 AM Li, Pan2 wrote:
>
> Thanks Richard for comments.
>
> > gen_int_libfunc will
_t sat_sdiv (sint32_t a, sint32_t b)
> {
> return a == INT32_MIN && b == -1 ? INT32_MAX : a / b;
> }
>
> sint32_t sat_abs (sint32_t a)
> {
> return a >= 0 ? a : (a == INT32_MIN ? INT32_MAX : -a);
> }
>
> Pan
>
> -Original Message-
>
e_simplify_COND_EXPR for why not hit the pattern...
> +(simplify
> + (cond
> + (lt @0 integer_zerop)
> +(plus:c @0 @1)
> +(cond (lt @1 integer_zerop) @1 @0))
> + (IFN_SAT_ADD @0 @1))
>
> Pan
>
> -Original Message-
> From: Richard Biener
> Sent
> +(plus:c @0 @1)
> + (cond (lt @1 integer_zerop) @1 @0))
> + (IFN_SAT_ADD @0 @1))
>
> Pan
>
> -Original Message-
> From: Richard Biener
> Sent: Monday, March 4, 2024 6:31 PM
> To: Li, Pan2
> Cc: Tamar Christina ; gcc-patches@gcc.gnu.org;
> juz
:31 PM
To: Li, Pan2
Cc: Tamar Christina ; gcc-patches@gcc.gnu.org;
juzhe.zh...@rivai.ai; Wang, Yanzhang ;
kito.ch...@gmail.com; jeffreya...@gmail.com
Subject: Re: [PATCH v2] Draft|Internal-fn: Introduce internal fn saturation
US_PLUS
On Sat, Mar 2, 2024 at 8:46 AM Li, Pan2 wrote:
>
> Hi
uot;, '3',
> gen_signed_fixed_libfunc)
> -OPTAB_NL(ussub_optab, "ussub$Q$a3", US_MINUS, "ussub", '3',
> gen_unsigned_fixed_libfunc)
> +OPTAB_NL(sssub_optab, "sssub$a3", SS_MINUS, "sssub", '3', gen_int_libfunc)
> +OPTAB_NL(ussub_optab, "ussub
(kind-of) sanitized.
We do lack direct IL representation of -ftrapv and -fwrapv, the
semantics on a PLUS_EXPR
depend on per-function flags. Eventually a common representation
could be found here.
For saturating I was thinking of .ADD_OVERFLOW (a, b,
saturation-value), a "trap" co
Original Message-
From: Richard Biener
Sent: Tuesday, February 27, 2024 9:42 PM
To: Tamar Christina
Cc: Li, Pan2 ; gcc-patches@gcc.gnu.org;
juzhe.zh...@rivai.ai; Wang, Yanzhang ;
kito.ch...@gmail.com; richard.sandiford@arm.com2; jeffreya...@gmail.com
Subject: Re: [PATCH v2] Draft|Internal-fn:
ISEL or widening-mul passes for
instructions the CPU can do
is existing practice and OK.
Thanks,
Richard.
> Thanks,
> Tamar
>
> > Pan
> >
> > -Original Message-
> > From: Tamar Christina
> > Sent: Tuesday, February 27, 2024 5:57 PM
> > To: Richard Biener
> Cc: Li, Pan2 ; gcc-patches@gcc.gnu.org;
> juzhe.zh...@rivai.ai;
> Wang, Yanzhang ; kito.ch...@gmail.com;
> richard.sandiford@arm.com2; jeffreya...@gmail.com
> Subject: RE: [PATCH v2] Draft|Internal-fn: Introduce internal fn saturation
> US_PLUS
>
> > -Orig
, February 27, 2024 5:57 PM
To: Richard Biener
Cc: Li, Pan2 ; gcc-patches@gcc.gnu.org;
juzhe.zh...@rivai.ai; Wang, Yanzhang ;
kito.ch...@gmail.com; richard.sandiford@arm.com2; jeffreya...@gmail.com
Subject: RE: [PATCH v2] Draft|Internal-fn: Introduce internal fn saturation
US_PLUS
> -Original Messa
jeffreya...@gmail.com
> Subject: Re: [PATCH v2] Draft|Internal-fn: Introduce internal fn saturation
> US_PLUS
>
> On Sun, Feb 25, 2024 at 10:01 AM Tamar Christina
> wrote:
> >
> > Hi Pan,
> >
> > > From: Pan Li
> > >
> > > Hi Richard &am
On Sun, Feb 25, 2024 at 10:01 AM Tamar Christina
wrote:
>
> Hi Pan,
>
> > From: Pan Li
> >
> > Hi Richard & Tamar,
> >
> > Try the DEF_INTERNAL_INT_EXT_FN as your suggestion. By mapping
> > us_plus$a3 to the RTL representation (us_plus:m x y) in optabs.def.
> > And then expand_US_PLUS in
, Yanzhang ;
kito.ch...@gmail.com; richard.guent...@gmail.com; richard.sandiford@arm.com2;
jeffreya...@gmail.com
Subject: RE: [PATCH v2] Draft|Internal-fn: Introduce internal fn saturation
US_PLUS
Hi Pan,
> From: Pan Li
>
> Hi Richard & Tamar,
>
> Try the DEF_INTERNAL_INT_EXT_FN
Hi Pan,
> From: Pan Li
>
> Hi Richard & Tamar,
>
> Try the DEF_INTERNAL_INT_EXT_FN as your suggestion. By mapping
> us_plus$a3 to the RTL representation (us_plus:m x y) in optabs.def.
> And then expand_US_PLUS in internal-fn.cc. Not very sure if my
> understanding is correct for
15 matches
Mail list logo