]> git.ipfire.org Git - thirdparty/gcc.git/commit
Change the `(zero_one ==/!= 0) ? y : z <op> y` patterns to use multiply rather than...
authorAndrew Pinski <apinski@marvell.com>
Wed, 7 Jun 2023 14:43:50 +0000 (07:43 -0700)
committerAndrew Pinski <apinski@marvell.com>
Fri, 9 Jun 2023 14:14:53 +0000 (07:14 -0700)
commit52c92fb3f4005051e86bb3e9c70a13fb34954cd1
tree0f22a2ce3f913b9b5fe5c05b09bd50d7e5008d4e
parent7ceed7e3e29c3375e3b8c4347d1985a72bbe7f11
Change the `(zero_one ==/!= 0) ? y : z <op> y` patterns to use multiply rather than `(-zero_one) & z`

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.
gcc/match.pd