]> git.ipfire.org Git - thirdparty/gcc.git/commit
MATCH: Add `(x | c) & ~(y | c)` and `x & ~(y | x)` patterns [PR98710]
authorAndrew Pinski <apinski@marvell.com>
Sun, 3 Sep 2023 21:26:53 +0000 (14:26 -0700)
committerAndrew Pinski <apinski@marvell.com>
Tue, 5 Sep 2023 21:14:55 +0000 (14:14 -0700)
commitab286761bf703a43bbd8495cd3fc33a7e88c8440
tree0b74dfef9715ca79e667e9ddeae4d39ac830b17b
parent8e995e84233661a1a246807a66cc84003426b1df
MATCH: Add `(x | c) & ~(y | c)` and `x & ~(y | x)` patterns [PR98710]

Adding some more simple bit_and/bit_ior patterns.
How often these show up, I have no idea.

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

PR tree-optimization/98710
* match.pd (`(x | c) & ~(y | c)`, `(x & c) | ~(y & c)`): New pattern.
(`x & ~(y | x)`, `x | ~(y & x)`): New patterns.

gcc/testsuite/ChangeLog:

PR tree-optimization/98710
* gcc.dg/tree-ssa/andor-7.c: New test.
* gcc.dg/tree-ssa/andor-8.c: New test.
gcc/match.pd
gcc/testsuite/gcc.dg/tree-ssa/andor-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/andor-8.c [new file with mode: 0644]