Apply clang-tidy fixes for readability-simplify-boolean-expr in BufferizableOpInterfa...
authorMehdi Amini <joker.eph@gmail.com>
Thu, 6 Oct 2022 19:16:56 +0000 (19:16 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Wed, 12 Oct 2022 01:16:36 +0000 (01:16 +0000)
mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp

index 2f1e1a8..6c54ffe 100644 (file)
@@ -1148,11 +1148,9 @@ struct ForeachThreadOpInterface
   bool isRepetitiveRegion(Operation *op, unsigned index) const {
     auto foreachThreadOp = cast<ForeachThreadOp>(op);
     // This op is not repetitive if it has just a single thread.
-    if (llvm::all_of(foreachThreadOp.getNumThreads(), [](Value v) {
-          return getConstantIntValue(v) == static_cast<int64_t>(1);
-        }))
-      return false;
-    return true;
+    return !llvm::all_of(foreachThreadOp.getNumThreads(), [](Value v) {
+      return getConstantIntValue(v) == static_cast<int64_t>(1);
+    });
   }
 };