summaryrefslogtreecommitdiff
path: root/gcc/bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/bitmap.c')
-rw-r--r--gcc/bitmap.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index 66066a68597..58f443243a2 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -1212,6 +1212,12 @@ bitmap_set_range (bitmap head, unsigned int start, unsigned int count)
if (!count)
return;
+ if (count == 1)
+ {
+ bitmap_set_bit (head, start);
+ return;
+ }
+
first_index = start / BITMAP_ELEMENT_ALL_BITS;
end_bit_plus1 = start + count;
last_index = (end_bit_plus1 - 1) / BITMAP_ELEMENT_ALL_BITS;
@@ -1311,6 +1317,12 @@ bitmap_clear_range (bitmap head, unsigned int start, unsigned int count)
if (!count)
return;
+ if (count == 1)
+ {
+ bitmap_clear_bit (head, start);
+ return;
+ }
+
first_index = start / BITMAP_ELEMENT_ALL_BITS;
end_bit_plus1 = start + count;
last_index = (end_bit_plus1 - 1) / BITMAP_ELEMENT_ALL_BITS;