Re: [PATCH] match.pd: Optimize a * !a to 0 [PR114009]

2024-03-06 Thread Richard Biener
On Wed, 6 Mar 2024, Jakub Jelinek wrote: > Hi! > > The following patch attempts to fix an optimization regression through > adding a simple simplification. We already have the > /* (m1 CMP m2) * d -> (m1 CMP m2) ? d : 0 */ > (if (!canonicalize_math_p ()) > (for cmp (tcc_comparison) > (simpli

[PATCH] match.pd: Optimize a * !a to 0 [PR114009]

2024-03-06 Thread Jakub Jelinek
Hi! The following patch attempts to fix an optimization regression through adding a simple simplification. We already have the /* (m1 CMP m2) * d -> (m1 CMP m2) ? d : 0 */ (if (!canonicalize_math_p ()) (for cmp (tcc_comparison) (simplify (mult:c (convert (cmp@0 @1 @2)) @3) (if (INTEGRAL