Re: [PATCH] target: [PR109657] (a ? -1 : 0) | b could be optimized better for aarch64

2023-05-02 Thread Andrew Pinski via Gcc-patches
On Tue, May 2, 2023 at 5:23 AM Richard Sandiford via Gcc-patches wrote: > > Andrew Pinski via Gcc-patches writes: > > There is no canonical form for this case defined. So the aarch64 backend > > needs > > a pattern to match both of these forms. > > > > The forms are: > > (set (reg/i:SI 0 x0) >

Re: [PATCH] target: [PR109657] (a ? -1 : 0) | b could be optimized better for aarch64

2023-05-02 Thread Richard Sandiford via Gcc-patches
Andrew Pinski via Gcc-patches writes: > There is no canonical form for this case defined. So the aarch64 backend needs > a pattern to match both of these forms. > > The forms are: > (set (reg/i:SI 0 x0) > (if_then_else:SI (eq (reg:CC 66 cc) > (const_int 0 [0])) > (reg:SI

[PATCH] target: [PR109657] (a ? -1 : 0) | b could be optimized better for aarch64

2023-04-28 Thread Andrew Pinski via Gcc-patches
There is no canonical form for this case defined. So the aarch64 backend needs a pattern to match both of these forms. The forms are: (set (reg/i:SI 0 x0) (if_then_else:SI (eq (reg:CC 66 cc) (const_int 0 [0])) (reg:SI 97) (const_int -1 [0x]))) and