| 1143 | } |
| 1144 | |
| 1145 | expr expr::round_up(const expr &power_of_two) const { |
| 1146 | expr minus_1 = power_of_two - mkUInt(1, power_of_two); |
| 1147 | return (*this + minus_1) & ~minus_1; |
| 1148 | } |
| 1149 | |
| 1150 | expr expr::round_up_bits(const expr &nbits) const { |
| 1151 | return round_up(mkUInt(1, *this) << nbits.zextOrTrunc(bits())); |
no outgoing calls
no test coverage detected