Re: [PATCH] Match: Simplify branch form 3 of unsigned SAT_ADD into branchless

2024-10-25 Thread Richard Biener
On Thu, Oct 24, 2024 at 4:08 PM wrote: > > From: Pan Li > > There are sorts of forms for the unsigned SAT_ADD. Some of them are > complicated while others are cheap. This patch would like to simplify > the complicated form into the cheap ones. For example as below: > > From the form 3 (branch)

[PATCH] Match: Simplify branch form 3 of unsigned SAT_ADD into branchless

2024-10-25 Thread pan2 . li
From: Pan Li There are sorts of forms for the unsigned SAT_ADD. Some of them are complicated while others are cheap. This patch would like to simplify the complicated form into the cheap ones. For example as below: >From the form 3 (branch): SAT_U_ADD = (X + Y) >= x ? (X + Y) : -1. To (bra