[Mlir-commits] [mlir] a858c90 - [MLIR] Apply clang-tidy fixes for readability-simplify-boolean-expr in InlinerInterfaceImpl.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Thu Sep 18 11:21:28 PDT 2025


Author: Mehdi Amini
Date: 2025-09-18T11:20:59-07:00
New Revision: a858c9071c25826d7d60af420e4dcf9106bf7cc0

URL: https://github.com/llvm/llvm-project/commit/a858c9071c25826d7d60af420e4dcf9106bf7cc0
DIFF: https://github.com/llvm/llvm-project/commit/a858c9071c25826d7d60af420e4dcf9106bf7cc0.diff

LOG: [MLIR] Apply clang-tidy fixes for readability-simplify-boolean-expr in InlinerInterfaceImpl.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp b/mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp
index 4ea2ac957fa1a..3c2758cb7c75d 100644
--- a/mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp
+++ b/mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp
@@ -755,10 +755,8 @@ struct LLVMInlinerInterface : public DialectInlinerInterface {
 
   bool allowSingleBlockOptimization(
       iterator_range<Region::iterator> inlinedBlocks) const final {
-    if (!inlinedBlocks.empty() &&
-        isa<LLVM::UnreachableOp>(inlinedBlocks.begin()->getTerminator()))
-      return false;
-    return true;
+    return !(!inlinedBlocks.empty() &&
+             isa<LLVM::UnreachableOp>(inlinedBlocks.begin()->getTerminator()));
   }
 
   /// Handle the given inlined return by replacing the uses of the call with the


        


More information about the Mlir-commits mailing list