[llvm] Silence illegal address computation warning (PR #83244)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 28 21:36:39 PST 2024
================
@@ -284,6 +284,7 @@ const RegisterBankInfo::ValueMapping *getValueMapping(unsigned BankID,
break;
}
+ assert(Idx < sizeof(ValMappings) / sizeof(ValMappings[0]));
----------------
arsenm wrote:
Can use std::size on ValMappings instead of the divide by sizeof
https://github.com/llvm/llvm-project/pull/83244
More information about the llvm-commits
mailing list