[NFC][MLIR] Fix -Wtype-limits warning

Fix the warning: comparison of unsigned expression in ‘>= 0’ is always
true.

Reviewed By: kiranchandramohan, shraiysh

Differential Revision: https://reviews.llvm.org/D126784
This commit is contained in:
PeixinQiao 2022-06-01 23:42:07 +08:00
parent 872f74440f
commit fe2cc16035
1 changed files with 2 additions and 2 deletions

View File

@ -823,7 +823,7 @@ def AtomicReadOp : OpenMP_Op<"atomic.read", [AllTypesMatch<["x", "v"]>]> {
/// The i-th variable operand passed.
Value getVariableOperand(unsigned i) {
assert(0 <= i && i < 2 && "invalid index position for an operand");
assert(i < 2 && "invalid index position for an operand");
return i == 0 ? x() : v();
}
}];
@ -871,7 +871,7 @@ def AtomicWriteOp : OpenMP_Op<"atomic.write"> {
/// The i-th variable operand passed.
Value getVariableOperand(unsigned i) {
assert(0 <= i && i < 2 && "invalid index position for an operand");
assert(i < 2 && "invalid index position for an operand");
return i == 0 ? address() : value();
}
}];