forked from OSchip/llvm-project
X86SpeculativeLoadHardeningPass::hardenValueInRegister - assert that we have a i8/i16/i32/i64 sized register. NFCI.
Silence static analyzer warning for out-of-range access to the SubRegImms[] array.
This commit is contained in:
parent
e30540a603
commit
73635adb86
|
@ -1915,8 +1915,9 @@ unsigned X86SpeculativeLoadHardeningPass::hardenValueInRegister(
|
|||
|
||||
auto *RC = MRI->getRegClass(Reg);
|
||||
int Bytes = TRI->getRegSizeInBits(*RC) / 8;
|
||||
|
||||
unsigned StateReg = PS->SSA.GetValueAtEndOfBlock(&MBB);
|
||||
assert((Bytes == 1 || Bytes == 2 || Bytes == 4 || Bytes == 8) &&
|
||||
"Unknown register size");
|
||||
|
||||
// FIXME: Need to teach this about 32-bit mode.
|
||||
if (Bytes != 8) {
|
||||
|
|
Loading…
Reference in New Issue