Re: [PATCHv2] move the (a-b) CMP 0 ? (a-b) : (b-a) optimization from fold_cond_expr_with_comparison to match

2023-10-23 Thread Richard Biener
On Sun, Oct 22, 2023 at 2:13 AM Andrew Pinski wrote: > > From: Andrew Pinski > > This patch moves the `(a-b) CMP 0 ? (a-b) : (b-a)` optimization > from fold_cond_expr_with_comparison to match. > > Bootstrapped and tested on x86_64-linux-gnu. OK. > Changes in: > v2: Removes `(a == b) ? 0 : (b -

[PATCHv2] move the (a-b) CMP 0 ? (a-b) : (b-a) optimization from fold_cond_expr_with_comparison to match

2023-10-21 Thread Andrew Pinski
From: Andrew Pinski This patch moves the `(a-b) CMP 0 ? (a-b) : (b-a)` optimization from fold_cond_expr_with_comparison to match. Bootstrapped and tested on x86_64-linux-gnu. Changes in: v2: Removes `(a == b) ? 0 : (b - a)` handling since it was handled via r14-3606-g3d86e7f4a8ae