Re: [PATCH 2/2] Fix 101805: Simplify min/max of boolean arguments

2021-09-18 Thread Jeff Law via Gcc-patches
On 8/13/2021 6:19 PM, apinski--- via Gcc-patches wrote: From: Andrew Pinski I noticed this while Richard B. fixing PR101756. Basically min of two bools is the same as doing an "and" and max of two bools is doing an "ior". gcc/ChangeLog: * match.pd: Add min/max patterns for bool typ

Re: [PATCH 2/2] Fix 101805: Simplify min/max of boolean arguments

2021-08-15 Thread Richard Biener via Gcc-patches
On Sat, Aug 14, 2021 at 2:21 AM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > I noticed this while Richard B. fixing PR101756. > Basically min of two bools is the same as doing an "and" > and max of two bools is doing an "ior". But that's only true for unsigned vals. For signed