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 DEF_INTERNAL_
, 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
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 interna
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
a
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
>
7 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_
sting practice.
Adding pattern recognition to 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
-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|Interna
that "saturating" is just another variant of overflow
behavior of which we have
trapping (-ftrapv), wrapping (-fwrapv), signed-undefined (default) and
also (kind-of) sanitized.
We do lack direct IL representation of -ftrapv and -fwrapv, the
semantics on a PLUS_EXPR
depend on per-function fl
-OPTAB_NL(sssub_optab, "sssub$Q$a3", SS_MINUS, "sssub", '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",
March 4, 2024 6: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:
&g
gt; +(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: Monday, March 4, 2024 6:31 PM
> To: Li, Pan2
> Cc: Tamar Christina ; gcc-
nested cond like below? I am debugging into
> gimple_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
>
> -Ori
er overflow
> }
>
> sint32_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
>
&g
@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
15 matches
Mail list logo