Re: [PATCH v2 2/2] Match: make SAT_ADD case 7 commutative

2024-11-06 Thread Richard Biener
On Mon, Nov 4, 2024 at 2:01 PM Akram Ahmad wrote: > > On 31/10/2024 08:00, Richard Biener wrote: > > On Wed, Oct 30, 2024 at 4:46 PM Akram Ahmad wrote: > >> On 29/10/2024 12:48, Richard Biener wrote: > >>> The testcases will FAIL unless the target has support for .SAT_ADD - you > >>> want to > >

Re: [PATCH v2 2/2] Match: make SAT_ADD case 7 commutative

2024-11-04 Thread Akram Ahmad
On 31/10/2024 08:00, Richard Biener wrote: On Wed, Oct 30, 2024 at 4:46 PM Akram Ahmad wrote: On 29/10/2024 12:48, Richard Biener wrote: The testcases will FAIL unless the target has support for .SAT_ADD - you want to add proper effective target tests here. The match.pd part looks OK to me.

Re: [PATCH v2 2/2] Match: make SAT_ADD case 7 commutative

2024-10-31 Thread Richard Biener
On Wed, Oct 30, 2024 at 4:46 PM Akram Ahmad wrote: > > On 29/10/2024 12:48, Richard Biener wrote: > > On Mon, Oct 28, 2024 at 4:45 PM Akram Ahmad wrote: > >> Case 7 of unsigned scalar saturating addition defines > >> SAT_ADD = X <= (X + Y) ? (X + Y) : -1. This is the same as > >> SAT_ADD = Y <= (

Re: [PATCH v2 2/2] Match: make SAT_ADD case 7 commutative

2024-10-30 Thread Akram Ahmad
On 29/10/2024 12:48, Richard Biener wrote: On Mon, Oct 28, 2024 at 4:45 PM Akram Ahmad wrote: Case 7 of unsigned scalar saturating addition defines SAT_ADD = X <= (X + Y) ? (X + Y) : -1. This is the same as SAT_ADD = Y <= (X + Y) ? (X + Y) : -1 due to usadd_left_part_1 being commutative. The p

Re: [PATCH v2 2/2] Match: make SAT_ADD case 7 commutative

2024-10-29 Thread Richard Biener
On Mon, Oct 28, 2024 at 4:45 PM Akram Ahmad wrote: > > Case 7 of unsigned scalar saturating addition defines > SAT_ADD = X <= (X + Y) ? (X + Y) : -1. This is the same as > SAT_ADD = Y <= (X + Y) ? (X + Y) : -1 due to usadd_left_part_1 > being commutative. > > The pattern for case 7 currently does

[PATCH v2 2/2] Match: make SAT_ADD case 7 commutative

2024-10-28 Thread Akram Ahmad
Case 7 of unsigned scalar saturating addition defines SAT_ADD = X <= (X + Y) ? (X + Y) : -1. This is the same as SAT_ADD = Y <= (X + Y) ? (X + Y) : -1 due to usadd_left_part_1 being commutative. The pattern for case 7 currently does not accept the alternative where Y is used in the condition. Ther