]> git.ipfire.org Git - thirdparty/gcc.git/commit
get_bitmask is sometimes less refined.
authorAndrew MacLeod <amacleod@redhat.com>
Tue, 24 Jun 2025 17:10:56 +0000 (13:10 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Wed, 25 Jun 2025 14:24:52 +0000 (10:24 -0400)
commit3b84d180fa840a447c4fd08d655ea0c2d94abd0b
tree7eaf1b024a8c157e85780d59bc394ac5e9cb7a6e
parent5aca8510abea6c3fac3336a7445863db07fd4a06
get_bitmask is sometimes less refined.

get_bitmask intersects the current mask with a mask generated from the
range.  If the 2 masks are incompatible, it currently returns UNKNOWN.
Instead, ti should return the original mask or information is lost.

* value-range.cc (irange::get_bitmask): Return original mask if
result is unknown.
(assert_snap_result): New.
(test_irange_snap_bounds): New.
(range_tests_misc): Call test_irange_snap_bounds.
gcc/value-range.cc