diff options
Diffstat (limited to 'llvm/lib/CodeGen/RegisterBankInfo.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/RegisterBankInfo.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegisterBankInfo.cpp b/llvm/lib/CodeGen/RegisterBankInfo.cpp index 5548430d1b0a..72b07eb1902d 100644 --- a/llvm/lib/CodeGen/RegisterBankInfo.cpp +++ b/llvm/lib/CodeGen/RegisterBankInfo.cpp @@ -484,9 +484,10 @@ void RegisterBankInfo::applyDefaultMapping(const OperandsMapper &OpdMapper) { // the storage. However, right now we don't necessarily bump all // the types to storage size. For instance, we can consider // s16 G_AND legal whereas the storage size is going to be 32. - assert(OrigTy.getSizeInBits() <= NewTy.getSizeInBits() && - "Types with difference size cannot be handled by the default " - "mapping"); + assert( + TypeSize::isKnownLE(OrigTy.getSizeInBits(), NewTy.getSizeInBits()) && + "Types with difference size cannot be handled by the default " + "mapping"); LLVM_DEBUG(dbgs() << "\nChange type of new opd from " << NewTy << " to " << OrigTy); MRI.setType(NewReg, OrigTy); |
