Re: [PATCH] match: Allow some optional casts for boolean comparisons

2025-05-16 Thread Richard Biener
On Thu, May 15, 2025 at 5:55 AM Andrew Pinski wrote: > > On Wed, May 14, 2025 at 7:39 PM Andrew Pinski > wrote: > > > > This is the next step in removing forward_propagate_into_comparison > > and forward_propagate_into_gimple_cond; In the case of `((int)(a cmp b)) != > > 0` > > we want to do th

Re: [PATCH] match: Allow some optional casts for boolean comparisons

2025-05-14 Thread Andrew Pinski
On Wed, May 14, 2025 at 7:39 PM Andrew Pinski wrote: > > This is the next step in removing forward_propagate_into_comparison > and forward_propagate_into_gimple_cond; In the case of `((int)(a cmp b)) != 0` > we want to do the transformation to `a cmp b` even if the cast is used twice. > This is ex

[PATCH] match: Allow some optional casts for boolean comparisons

2025-05-14 Thread Andrew Pinski
This is the next step in removing forward_propagate_into_comparison and forward_propagate_into_gimple_cond; In the case of `((int)(a cmp b)) != 0` we want to do the transformation to `a cmp b` even if the cast is used twice. This is exactly what forward_propagate_into_comparison/forward_propagate_