On 6/7/23 15:32, Andrew Pinski via Gcc-patches wrote:
Since there is a pattern to convert `(-zero_one) & z` into `zero_one * z` 
already,
it is better if we don't do a secondary transformation. This reduces the extra
statements produced by match-and-simplify on the gimple level too.

gcc/ChangeLog:

        * match.pd (`zero_one ==/!= 0) ? y : z <op> y`): Use
        multiply rather than negation/bit_and.
Don't you need to check the types in a manner similar to what the A & -Y -> X * Y pattern does before you make this transformation?

jeff

Reply via email to