]> gcc.gnu.org Git - gcc.git/commit
Adjust operators equal and not_equal to check bitmasks against constants
authorAndrew MacLeod <amacleod@redhat.com>
Wed, 25 Oct 2023 13:46:50 +0000 (09:46 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 3 Nov 2023 16:54:50 +0000 (12:54 -0400)
commit7ab79a40b546a1470abaf76bec74c63e9990fe47
tree6e109809952740cce8211058a0b44f70aea973c5
parenta291237b628f419d7f7ac264dd7b42947b565222
Adjust operators equal and not_equal to check bitmasks against constants

Check to see if a comparison to a constant can be determined to always
be not-equal based on the bitmask.

PR tree-optimization/111766
gcc/
* range-op.cc (operator_equal::fold_range): Check constants
against the bitmask.
(operator_not_equal::fold_range): Ditto.
* value-range.h (irange_bitmask::member_p): New.

gcc/testsuite/
* gcc.dg/pr111766.c: New.
gcc/range-op.cc
gcc/testsuite/gcc.dg/pr111766.c [new file with mode: 0644]
gcc/value-range.h
This page took 0.070172 seconds and 5 git commands to generate.