aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/frontend-passes.cc
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@gmail.com>2023-10-13 13:27:18 -0700
committerAndrew Pinski <pinskia@gmail.com>2023-10-17 08:51:51 -0700
commitb18d1cabe2f9cccc0cad697e1e0bfd2abebb85f9 (patch)
treed3ee416cd553b7861a1c52947a7eccb63e21ed60 /gcc/fortran/frontend-passes.cc
parentda65efe433f20984bab93335d8f994a6987847e6 (diff)
downloadgcc-b18d1cabe2f9cccc0cad697e1e0bfd2abebb85f9.zip
gcc-b18d1cabe2f9cccc0cad697e1e0bfd2abebb85f9.tar.gz
gcc-b18d1cabe2f9cccc0cad697e1e0bfd2abebb85f9.tar.bz2
MATCH: [PR111432] Simplify `a & (x | CST)` to a when we know that (a & ~CST) == 0
This adds the simplification `a & (x | CST)` to a when we know that `(a & ~CST) == 0`. In a similar fashion as `a & CST` is handle. I looked into handling `a | (x & CST)` but that I don't see any decent simplifications happening. OK? Bootstrapped and tested on x86_linux-gnu with no regressions. PR tree-optimization/111432 gcc/ChangeLog: * match.pd (`a & (x | CST)`): New pattern. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/bitops-7.c: New test.
Diffstat (limited to 'gcc/fortran/frontend-passes.cc')
0 files changed, 0 insertions, 0 deletions