const PartialMapping *begin() const { return BreakDown; }
const PartialMapping *end() const { return BreakDown + NumBreakDowns; }
- /// Verify that this mapping makes sense for a value of \p ExpectedBitWidth.
+ /// Verify that this mapping makes sense for a value of
+ /// \p MeaningFulBitWidth.
/// \note This method does not check anything when assertions are disabled.
///
/// \return True is the check was successful.
- bool verify(unsigned ExpectedBitWidth) const;
+ bool verify(unsigned MeaningFulBitWidth) const;
/// Print this on dbgs() stream.
void dump() const;
OS << "nullptr";
}
-bool RegisterBankInfo::ValueMapping::verify(unsigned ExpectedBitWidth) const {
+bool RegisterBankInfo::ValueMapping::verify(unsigned MeaningFulBitWidth) const {
assert(NumBreakDowns && "Value mapped nowhere?!");
unsigned OrigValueBitWidth = 0;
for (const RegisterBankInfo::PartialMapping &PartMap : *this) {
OrigValueBitWidth =
std::max(OrigValueBitWidth, PartMap.getHighBitIdx() + 1);
}
- assert(OrigValueBitWidth == ExpectedBitWidth && "BitWidth does not match");
+ assert(OrigValueBitWidth >= MeaningFulBitWidth &&
+ "Meaningful bits not covered by the mapping");
APInt ValueMask(OrigValueBitWidth, 0);
for (const RegisterBankInfo::PartialMapping &PartMap : *this) {
// Check that the union of the partial mappings covers the whole value,