diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2024-05-26 17:38:37 -0700 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2024-05-29 08:54:09 -0700 |
commit | 547143df5aa0960fb149a26933dad7ca1c363afb (patch) | |
tree | 591367117f1beb8b9ff5ee5dbbadc4d4ea71f248 /libcpp | |
parent | 0a9154d154957b21eb2c9e4fbe9869e50fb9742f (diff) | |
download | gcc-547143df5aa0960fb149a26933dad7ca1c363afb.zip gcc-547143df5aa0960fb149a26933dad7ca1c363afb.tar.gz gcc-547143df5aa0960fb149a26933dad7ca1c363afb.tar.bz2 |
match: Add support for `a ^ CST` to bitwise_inverted_equal_p [PR115224]
While looking into something else, I noticed that `a ^ CST` needed to be
special casing to bitwise_inverted_equal_p as it would simplify to `a ^ ~CST`
for the bitwise not.
Bootstrapped and tested on x86_64-linux-gnu with no regressions.
PR tree-optimization/115224
gcc/ChangeLog:
* generic-match-head.cc (bitwise_inverted_equal_p): Add `a ^ CST`
case.
* gimple-match-head.cc (gimple_bit_xor_cst): New declaration.
(gimple_bitwise_inverted_equal_p): Add `a ^ CST` case.
* match.pd (bit_xor_cst): New match.
(maybe_bit_not): Add bit_xor_cst case.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/bitops-8.c: New test.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions