]> git.ipfire.org Git - thirdparty/gcc.git/commit
New XOR fold routine.
authorAndrew MacLeod <amacleod@redhat.com>
Wed, 29 Oct 2025 22:14:40 +0000 (18:14 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 6 Nov 2025 13:54:17 +0000 (08:54 -0500)
commita137663b93492f8d097438185d2ccdcf57848174
tree13446ab1d997e4be715e7146ffb7ecadd10749bf
parentc35bab08191134ada941191d95693597af71270a
New XOR fold routine.

XOR goes to VARYING frequently with complex ranges. The other bitwise
operations are improved, so implement XOR using them as well.

PR tree-optimization/113632
gcc/
* range-op-mixed.h (operator_bitwise_xor): Relocate and adjust.
(operator_bitwise_xor::m_and, m_or, m_not): New.
* range-op.cc (operator_bitwise_xor::fold_range): New.

gcc/testsuite/
* gcc.dg/pr113632.c: New.
gcc/range-op-mixed.h
gcc/range-op.cc
gcc/testsuite/gcc.dg/pr113632.c [new file with mode: 0644]