Re: Optimizing codegen for absolute differences in AArch64

2025-01-15 Thread Jennifer Schmitz via Gcc
> On 15 Jan 2025, at 08:38, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Tue, Jan 14, 2025 at 4:35 PM Jennifer Schmitz via Gcc > wrote: >> >> We are working on improving codegen for the following test cases (for all >> integer types T): >> >>

Re: Optimizing codegen for absolute differences in AArch64

2025-01-14 Thread Richard Biener via Gcc
On Tue, Jan 14, 2025 at 4:35 PM Jennifer Schmitz via Gcc wrote: > > We are working on improving codegen for the following test cases (for all > integer types T): > > T foo (T x, T y) > { > T diff = x - y; > return x > y ? diff : -diff; > } > > T bar (T x, T y) > { > T diff1 = x - y; > T d

Optimizing codegen for absolute differences in AArch64

2025-01-14 Thread Jennifer Schmitz via Gcc
We are working on improving codegen for the following test cases (for all integer types T): T foo (T x, T y) { T diff = x - y; return x > y ? diff : -diff; } T bar (T x, T y) { T diff1 = x - y; T diff2 = y - x; return x > y ? diff1 : diff2; } For signed integers, we already proposed a