aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.cc
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-09-23 04:38:02 +0000
committerAndrew Pinski <pinskia@gmail.com>2023-09-24 06:48:09 +0000
commit1bf0cd05cb30889cae4b6cf06e80b7f3a13c40c1 (patch)
tree1a36544c450ff998633dec2b00ade1838c21aa07 /gcc/tree-ssa-phiopt.cc
parent08b887fd41c0cf2b14a8d8cda21d86f2c991f606 (diff)
downloadgcc-1bf0cd05cb30889cae4b6cf06e80b7f3a13c40c1.zip
gcc-1bf0cd05cb30889cae4b6cf06e80b7f3a13c40c1.tar.gz
gcc-1bf0cd05cb30889cae4b6cf06e80b7f3a13c40c1.tar.bz2
MATCH: Add `(X & ~Y) & Y` and `(X | ~Y) | Y`
Even though this gets optimized by reassociation, catching it more often will always be better. Note the reason why I didn't add `(X ^ ~Y) ^ Y` is that it gets caught by prefering `~(X ^ Y)` to `(X ^ ~Y)` which then it is caught by the the pattern for `(X ^ Y) ^ Y` already. PR tree-optimization/111543 gcc/ChangeLog: * match.pd (`(X & ~Y) & Y`, `(X | ~Y) | Y`): New patterns. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/bitops-4.c: New test.
Diffstat (limited to 'gcc/tree-ssa-phiopt.cc')
0 files changed, 0 insertions, 0 deletions