[Mlir-commits] [mlir] 7482175 - Apply clang-tidy fixes for readability-simplify-boolean-expr in CSE.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Tue Nov 22 16:53:03 PST 2022
Author: Mehdi Amini
Date: 2022-11-23T00:52:35Z
New Revision: 74821754e7cf57c4295b12852fdb8b748cf41760
URL: https://github.com/llvm/llvm-project/commit/74821754e7cf57c4295b12852fdb8b748cf41760
DIFF: https://github.com/llvm/llvm-project/commit/74821754e7cf57c4295b12852fdb8b748cf41760.diff
LOG: Apply clang-tidy fixes for readability-simplify-boolean-expr in CSE.cpp (NFC)
Added:
Modified:
mlir/lib/Transforms/CSE.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Transforms/CSE.cpp b/mlir/lib/Transforms/CSE.cpp
index 97f6cfd20f28f..5e5852ad0db4b 100644
--- a/mlir/lib/Transforms/CSE.cpp
+++ b/mlir/lib/Transforms/CSE.cpp
@@ -263,8 +263,8 @@ LogicalResult CSE::simplifyOperation(ScopedMapTy &knownValues, Operation *op,
// Don't simplify operations with nested blocks. We don't currently model
// equality comparisons correctly among other things. It is also unclear
// whether we would want to CSE such operations.
- if (!(op->getNumRegions() == 0 ||
- (op->getNumRegions() == 1 && llvm::hasSingleElement(op->getRegion(0)))))
+ if (op->getNumRegions() != 0 &&
+ (op->getNumRegions() != 1 || !llvm::hasSingleElement(op->getRegion(0))))
return failure();
// Some simple use case of operation with memory side-effect are dealt with
More information about the Mlir-commits
mailing list