...@gmail.com; tamar.christ...@arm.com;
pins...@gmail.com
Subject: Re: [PATCH v2] Match: Support __builtin_add_overflow branch form for
unsigned SAT_ADD
On Fri, May 24, 2024 at 8:56 AM Richard Biener
wrote:
>
> On Fri, May 24, 2024 at 8:37 AM Li, Pan2 wrote:
> >
> > Thanks Je
Richard.
>
> Richard.
>
> > + }
> > +
> > + return matched_p;
> > +}
> > +
> > /* gimple_simplify_phiopt is like gimple_simplify but designed for PHIOPT.
> > Return NULL if nothing can be simplified or the resulting simplified
> >
c_block cond_bb,
> basic_block middle_bb,
> So, given the condition COND, and the two PHI arguments, match and
> simplify
> can happen on (COND) ? arg0 : arg1. */
>
> + if (match_phi_to_gimple_cond (cond_bb, phi, arg0, arg1))
> +return true;
> +
>stmt =
: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com;
tamar.christ...@arm.com; pins...@gmail.com
Subject: Re: [PATCH v2] Match: Support __builtin_add_overflow branch form for
unsigned SAT_ADD
On 5/23/24 6:14 AM, Richard Biener wrote:
> On Thu, May 23, 2024 at 1:08 PM Li, Pan2 wrote:
&g
On 5/23/24 6:14 AM, Richard Biener wrote:
On Thu, May 23, 2024 at 1:08 PM Li, Pan2 wrote:
I have a try to convert the PHI from Part-A to Part-B, aka PHI to _2 = phi_cond
? _1 : 255.
And then we can do the matching on COND_EXPR in the underlying widen-mul pass.
Unfortunately, meet some ICE
_2 = phi_cond_6 ? _1 : 255;
> return _2;
>
> }
>
> -Original Message-
> From: Li, Pan2
> Sent: Thursday, May 23, 2024 12:17 PM
> To: Richard Biener
> Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com;
> tamar.christ...@arm.com; pins...@gmail.
: Wednesday, May 22, 2024 9:14 PM
To: Li, Pan2
Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com;
tamar.christ...@arm.com; pins...@gmail.com
Subject: Re: [PATCH v2] Match: Support __builtin_add_overflow branch form for
unsigned SAT_ADD
On Wed, May 22, 2024 at 3:17 AM wr
:14 PM
To: Li, Pan2
Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com;
tamar.christ...@arm.com; pins...@gmail.com
Subject: Re: [PATCH v2] Match: Support __builtin_add_overflow branch form for
unsigned SAT_ADD
On Wed, May 22, 2024 at 3:17 AM wrote:
>
>
On Wed, May 22, 2024 at 3:17 AM wrote:
>
> From: Pan Li
>
> This patch would like to support the __builtin_add_overflow branch form for
> unsigned SAT_ADD. For example as below:
>
> uint64_t
> sat_add (uint64_t x, uint64_t y)
> {
> uint64_t ret;
> return __builtin_add_overflow (x, y, &ret) ?
From: Pan Li
This patch would like to support the __builtin_add_overflow branch form for
unsigned SAT_ADD. For example as below:
uint64_t
sat_add (uint64_t x, uint64_t y)
{
uint64_t ret;
return __builtin_add_overflow (x, y, &ret) ? -1 : ret;
}
Different to the branchless version, we lever
10 matches
Mail list logo