C++20 <bit> provides some functions that are similar to some of HotSpot's powerOfTwo utilities. However, they only support unsigned types, so we would probably want to keep the names of the existing HotSpot functions as wrappers that also handle signed types.
is_power_of_2 -> std::has_single_bit
round_up_power_of_2 -> std::bit_ceil
round_down_power_of_2 -> std::bit_floor
is_power_of_2 -> std::has_single_bit
round_up_power_of_2 -> std::bit_ceil
round_down_power_of_2 -> std::bit_floor