]> git.ipfire.org Git - thirdparty/gcc.git/commit
Improve contains_p and intersect with bitmasks.
authorAndrew MacLeod <amacleod@redhat.com>
Wed, 28 May 2025 20:27:16 +0000 (16:27 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Wed, 18 Jun 2025 17:49:20 +0000 (13:49 -0400)
commit9560cd83671a32ee2253f307112ac39b40aa712c
tree64196696d2e91e97d4adf1b6576c3dc631ebb70e
parente60c1793efd81571e408e875f5e42f441ea311e8
Improve contains_p and intersect with bitmasks.

Improve the way contains_p (wide_int) and intersect behave wioth
singletons and bitmasks.  Also fix a buglet in bitmask_intersect when the
result is a singleton which is not in the current range.

PR tree-optimization/119039
gcc/
* value-range.cc (irange::contains_p): Call wide_int version of
contains_p for singleton ranges.
(irange::intersect): If either range is a singleton, use
contains_p.

gcc/testsuite/
* gcc.dg/pr119039-2.c: New.
gcc/testsuite/gcc.dg/pr119039-2.c [new file with mode: 0644]
gcc/value-range.cc