[llvm] CodeGen: Eliminate dynamic relocations in the register superclass tables. (PR #119122)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 03:02:24 PST 2024
================
@@ -172,7 +172,8 @@ X86RegisterInfo::getLargestLegalSuperClass(const TargetRegisterClass *RC,
if (getRegSizeInBits(*Super) == getRegSizeInBits(*RC))
return Super;
}
- Super = *I++;
+ Super = I.isValid() ? getRegClass(*I) : nullptr;
+ ++I;
----------------
jayfoad wrote:
Are you allowed to increment an invalid iterator?
https://github.com/llvm/llvm-project/pull/119122
More information about the llvm-commits
mailing list