diff --git a/llvm/include/llvm/Support/LEB128.h b/llvm/include/llvm/Support/LEB128.h index 7fc572b6ff06e..40b6cf79bacf7 100644 --- a/llvm/include/llvm/Support/LEB128.h +++ b/llvm/include/llvm/Support/LEB128.h @@ -135,16 +135,15 @@ inline uint64_t decodeULEB128(const uint8_t *p, unsigned *n = nullptr, uint64_t Value = 0; unsigned Shift = 0; do { - if (LLVM_UNLIKELY(p == end)) { + if (p == end) { if (error) *error = "malformed uleb128, extends past end"; Value = 0; break; } uint64_t Slice = *p & 0x7f; - if (LLVM_UNLIKELY(Shift >= 63) && - ((Shift == 63 && (Slice << Shift >> Shift) != Slice) || - (Shift > 63 && Slice != 0))) { + if (Shift >= 63 && ((Shift == 63 && (Slice << Shift >> Shift) != Slice) || + (Shift > 63 && Slice != 0))) { if (error) *error = "uleb128 too big for uint64"; Value = 0; @@ -170,7 +169,7 @@ inline int64_t decodeSLEB128(const uint8_t *p, unsigned *n = nullptr, unsigned Shift = 0; uint8_t Byte; do { - if (LLVM_UNLIKELY(p == end)) { + if (p == end) { if (error) *error = "malformed sleb128, extends past end"; if (n) @@ -179,9 +178,8 @@ inline int64_t decodeSLEB128(const uint8_t *p, unsigned *n = nullptr, } Byte = *p; uint64_t Slice = Byte & 0x7f; - if (LLVM_UNLIKELY(Shift >= 63) && - ((Shift == 63 && Slice != 0 && Slice != 0x7f) || - (Shift > 63 && Slice != (Value < 0 ? 0x7f : 0x00)))) { + if ((Shift >= 63) && ((Shift == 63 && Slice != 0 && Slice != 0x7f) || + (Shift > 63 && Slice != (Value < 0 ? 0x7f : 0x00)))) { if (error) *error = "sleb128 too big for int64"; if (n)