Skip to content

Conversation

joker-eph
Copy link
Collaborator

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Sep 3, 2025

@llvm/pr-subscribers-mlir-linalg

@llvm/pr-subscribers-mlir

Author: Mehdi Amini (joker-eph)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/156738.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/Linalg/Transforms/Specialize.cpp (+3-5)
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Specialize.cpp b/mlir/lib/Dialect/Linalg/Transforms/Specialize.cpp
index 35ba4f159113f..40fc0d68e358f 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Specialize.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Specialize.cpp
@@ -182,11 +182,9 @@ static FailureOr<LinalgOp> specializeLinalgContractions(RewriterBase &rewriter,
 
   if (!mlir::linalg::detail::isContractionBody(
           *genericOp.getBlock(), [](Operation *first, Operation *second) {
-            if ((isa<arith::MulFOp>(first) && isa<arith::AddFOp>(second)) ||
-                (isa<arith::MulIOp>(first) && isa<arith::AddIOp>(second)) ||
-                (isa<complex::MulOp>(first) && isa<complex::AddOp>(second)))
-              return true;
-            return false;
+            return (isa<arith::MulFOp>(first) && isa<arith::AddFOp>(second)) ||
+                   (isa<arith::MulIOp>(first) && isa<arith::AddIOp>(second)) ||
+                   (isa<complex::MulOp>(first) && isa<complex::AddOp>(second));
           }))
     return failure();
 

@joker-eph joker-eph restored the tidy branch September 3, 2025 19:46
@joker-eph joker-eph deleted the tidy branch September 3, 2025 19:46
@joker-eph joker-eph restored the tidy branch September 3, 2025 19:52
@joker-eph joker-eph deleted the tidy branch September 3, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants