Re: [PATCH] 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
On Thu, Oct 19, 2023 at 10:13 PM Andrew Pinski wrote: > > On Mon, Jul 12, 2021 at 4:47 AM Richard Biener via Gcc-patches > wrote: > > > > On Sun, Jul 11, 2021 at 4:12 AM apinski--- via Gcc-patches > > wrote: > > > > > > From: Andrew Pinski > > > > > > This patch moves the (a-b) CMP 0 ? (a-b) :

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

2023-10-19 Thread Andrew Pinski
On Mon, Jul 12, 2021 at 4:47 AM Richard Biener via Gcc-patches wrote: > > On Sun, Jul 11, 2021 at 4:12 AM apinski--- via Gcc-patches > 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. > >

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

2021-07-12 Thread Richard Biener via Gcc-patches
On Sun, Jul 11, 2021 at 4:12 AM apinski--- via Gcc-patches 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. So I searched and I guess these transforms are produced from /* If we have A op 0 ? A :

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

2021-07-10 Thread apinski--- via Gcc-patches
From: Andrew Pinski This patch moves the (a-b) CMP 0 ? (a-b) : (b-a) optimization from fold_cond_expr_with_comparison to match. OK? Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * match.pd ((A-B) CMP 0 ? (A-B) : (B - A)): New patterns. gcc/testsuite/ChangeLog: