Re: [PATCH 1/2] Match: support new case of unsigned scalar SAT_SUB

2024-10-24 Thread Richard Biener
On Mon, Oct 21, 2024 at 4:22 PM Akram Ahmad wrote: > > This patch adds a new case for unsigned scalar saturating subtraction > using a branch with a greater-than-or-equal condition. For example, > > X >= (X - Y) ? (X - Y) : 0 > > is transformed into SAT_SUB (X, Y) when X and Y are unsigned

[PATCH 1/2] Match: support new case of unsigned scalar SAT_SUB

2024-10-21 Thread Akram Ahmad
This patch adds a new case for unsigned scalar saturating subtraction using a branch with a greater-than-or-equal condition. For example, X >= (X - Y) ? (X - Y) : 0 is transformed into SAT_SUB (X, Y) when X and Y are unsigned scalars, which therefore correctly matches more cases of IFN SA