diff options
author | Andrew Pinski <apinski@marvell.com> | 2023-07-29 16:59:10 -0700 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2023-07-31 10:12:06 -0700 |
commit | 0258b73680e21fd96290af961c80966ac6b3cc68 (patch) | |
tree | 56220448040f639c4cb74fc7a6f800feb6eb0f71 /gcc/c/c-decl.cc | |
parent | b9237226fdc9387bccf584a811b30c5d3689ffd2 (diff) | |
download | gcc-0258b73680e21fd96290af961c80966ac6b3cc68.zip gcc-0258b73680e21fd96290af961c80966ac6b3cc68.tar.gz gcc-0258b73680e21fd96290af961c80966ac6b3cc68.tar.bz2 |
MATCH: PR 106164 : Optimize `(X CMP1 Y) AND/IOR (X CMP2 Y)`
I noticed that there are patterns that optimize
`(X CMP1 CST1) AND/IOR (X CMP2 CST2)` and we can easily extend
them to support the `(X CMP1 Y) AND/IOR (X CMP2 Y)` by saying they
compare equal. This allows for this kind of optimization for integral
and pointer types (which have the same semantics).
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
gcc/ChangeLog:
PR tree-optimization/106164
* match.pd: Extend the `(X CMP1 CST1) AND/IOR (X CMP2 CST2)`
patterns to support `(X CMP1 Y) AND/IOR (X CMP2 Y)`.
gcc/testsuite/ChangeLog:
PR tree-optimization/106164
* gcc.dg/tree-ssa/cmpbit-1.c: New test.
Diffstat (limited to 'gcc/c/c-decl.cc')
0 files changed, 0 insertions, 0 deletions