[Mlir-commits] [mlir] 56245cc - [MLIR] NFC. Address clang-tidy warning in AffineOps.cpp
Uday Bondhugula
llvmlistbot at llvm.org
Mon Apr 11 21:29:08 PDT 2022
Author: Uday Bondhugula
Date: 2022-04-12T09:58:29+05:30
New Revision: 56245cc18c672753e0fa7ec8d69c56e21aaece82
URL: https://github.com/llvm/llvm-project/commit/56245cc18c672753e0fa7ec8d69c56e21aaece82
DIFF: https://github.com/llvm/llvm-project/commit/56245cc18c672753e0fa7ec8d69c56e21aaece82.diff
LOG: [MLIR] NFC. Address clang-tidy warning in AffineOps.cpp
NFC. Address clang-tidy warning in AffineOps.cpp.
Added:
Modified:
mlir/lib/Dialect/Affine/IR/AffineOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
index 168c5497778f2..2ea601a4f0f46 100644
--- a/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
+++ b/mlir/lib/Dialect/Affine/IR/AffineOps.cpp
@@ -1726,9 +1726,7 @@ void AffineForOp::getCanonicalizationPatterns(RewritePatternSet &results,
/// Returns true if the affine.for has zero iterations in trivial cases.
static bool hasTrivialZeroTripCount(AffineForOp op) {
Optional<uint64_t> tripCount = getTrivialConstantTripCount(op);
- if (tripCount.hasValue() && tripCount.getValue() == 0)
- return true;
- return false;
+ return tripCount.hasValue() && tripCount.getValue() == 0;
}
LogicalResult AffineForOp::fold(ArrayRef<Attribute> operands,
More information about the Mlir-commits
mailing list