Re: [PATCH] gimple-fold: Canonicalize _Bool == 0 and _Bool != 1

2025-05-13 Thread Richard Biener
On Mon, May 12, 2025 at 7:32 PM Andrew Pinski wrote: > > On Mon, May 12, 2025 at 3:56 AM Richard Biener > wrote: > > > > On Sat, May 10, 2025 at 3:13 AM Andrew Pinski > > wrote: > > > > > > This move this canonicalization from forwprop > > > (forward_propagate_into_gimple_cond) > > > to gimple

Re: [PATCH] gimple-fold: Canonicalize _Bool == 0 and _Bool != 1

2025-05-12 Thread Andrew Pinski
On Mon, May 12, 2025 at 3:56 AM Richard Biener wrote: > > On Sat, May 10, 2025 at 3:13 AM Andrew Pinski > wrote: > > > > This move this canonicalization from forwprop > > (forward_propagate_into_gimple_cond) > > to gimple-fold. > > This is a step in removing forward_propagate_into_gimple_cond f

Re: [PATCH] gimple-fold: Canonicalize _Bool == 0 and _Bool != 1

2025-05-12 Thread Richard Biener
On Sat, May 10, 2025 at 3:13 AM Andrew Pinski wrote: > > This move this canonicalization from forwprop > (forward_propagate_into_gimple_cond) > to gimple-fold. > This is a step in removing forward_propagate_into_gimple_cond from forwprop. I don't think fold_stmt should mess with the CFG, so NACK

[PATCH] gimple-fold: Canonicalize _Bool == 0 and _Bool != 1

2025-05-09 Thread Andrew Pinski
This move this canonicalization from forwprop (forward_propagate_into_gimple_cond) to gimple-fold. This is a step in removing forward_propagate_into_gimple_cond from forwprop. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * gimple-fold.cc (replace_stmt_with_simplification)