aboutsummaryrefslogtreecommitdiff
path: root/libphobos/src/std/algorithm/comparison.d
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2022-09-27 08:05:30 +0200
committerAldy Hernandez <aldyh@redhat.com>2022-09-27 10:43:11 +0200
commitbe4a6551ed37c1e7dbdfb9400fc2e2b5d40c5be2 (patch)
treea6917d20d2b4d0c3b4a6abbc47c58b7495d48bf0 /libphobos/src/std/algorithm/comparison.d
parent1db05e1a1c1ee3d8a95826d477173fb7c557c002 (diff)
downloadgcc-be4a6551ed37c1e7dbdfb9400fc2e2b5d40c5be2.zip
gcc-be4a6551ed37c1e7dbdfb9400fc2e2b5d40c5be2.tar.gz
gcc-be4a6551ed37c1e7dbdfb9400fc2e2b5d40c5be2.tar.bz2
irange: keep better track of powers of 2.
When setting the nonzero bits to a mask containing only one bit, set the range immediately, as it can be devined from the mask. This helps us keep better track of powers of two. For example, with this patch a nonzero mask of 0x8000 is set to a range of [0,0][0x8000,0x8000] with a nonzero mask of 0x8000. gcc/ChangeLog: * value-range.cc (irange::set_nonzero_bits): Set range when known. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/popcount6.c: New test.
Diffstat (limited to 'libphobos/src/std/algorithm/comparison.d')
0 files changed, 0 insertions, 0 deletions