diff options
-rw-r--r-- | include/llvm/MC/MCRegisterInfo.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/MC/MCRegisterInfo.h b/include/llvm/MC/MCRegisterInfo.h index 1deb4ef252..ada5ae80af 100644 --- a/include/llvm/MC/MCRegisterInfo.h +++ b/include/llvm/MC/MCRegisterInfo.h @@ -76,7 +76,7 @@ public: bool contains(unsigned Reg) const { unsigned InByte = Reg % 8; unsigned Byte = Reg / 8; - if (Byte > RegSetSize) + if (Byte >= RegSetSize) return false; return (RegSet[Byte] & (1 << InByte)) != 0; } |