> On Nov 27, 2025, at 8:16 AM, Jakub Jelinek <[email protected]> wrote:
> 
> On Thu, Nov 27, 2025 at 09:02:20PM +0800, Dongyan Chen wrote:
>> This patch implements an optimization to transform (a * b) == 0 to
>> (a == 0) || (b == 0) for signed and unsigned integer.
> 
> Shouldn't that just optimize to (a | b) == 0
> instead?  At least when a and b have the same type.

I would think that (a==0) || (b==0) would optimize already to (a|b)==0 provided 
b has no side effects.

        paul

Reply via email to