Skip to content

Commit fd0fa2b

Browse files
fix off by one found by llvm/test/CodeGen/SystemZ/inline-asm-addr.ll
1 parent 0662f8d commit fd0fa2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/IR/InlineAsm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ class InlineAsm final : public Value {
377377
assert((isMemKind() || isFuncKind()) &&
378378
"Not expected mem or function flag!");
379379
uint32_t D = getData();
380-
assert(D < static_cast<uint32_t>(ConstraintCode::Max) &&
380+
assert(D <= static_cast<uint32_t>(ConstraintCode::Max) &&
381381
D >= static_cast<uint32_t>(ConstraintCode::Unknown) &&
382382
"unexpected value for memory constraint");
383383
return static_cast<ConstraintCode>(D);

0 commit comments

Comments
 (0)