diff --git a/mlir/lib/Analysis/Presburger/Utils.cpp b/mlir/lib/Analysis/Presburger/Utils.cpp --- a/mlir/lib/Analysis/Presburger/Utils.cpp +++ b/mlir/lib/Analysis/Presburger/Utils.cpp @@ -120,7 +120,7 @@ // Check if `c` satisfies the condition `0 <= c <= divisor - 1`. This also // implictly checks that `divisor` is positive. - if (c < 0 || c > divisor - 1) + if (!(0 <= c && c <= divisor - 1)) // NOLINT return failure(); // The inequality pair can be used to extract the division.