forked from OSchip/llvm-project
[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:
parent
872f74440f
commit
fe2cc16035
|
@ -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();
|
||||
}
|
||||
}];
|
||||
|
|
Loading…
Reference in New Issue