diff --git a/mlir/test/lib/Dialect/Linalg/TestLinalgElementwiseFusion.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgElementwiseFusion.cpp --- a/mlir/test/lib/Dialect/Linalg/TestLinalgElementwiseFusion.cpp +++ b/mlir/test/lib/Dialect/Linalg/TestLinalgElementwiseFusion.cpp @@ -72,7 +72,7 @@ std::optional fusionResult = linalg::fuseElementwiseOps(rewriter, fusableOperand); if (!fusionResult) - rewriter.notifyMatchFailure(genericOp, "fusion failed"); + return rewriter.notifyMatchFailure(genericOp, "fusion failed"); for (auto [origValue, replacement] : fusionResult->replacements) { rewriter.replaceUseIf(origValue, replacement, [&](OpOperand &use) { return use.getOwner() != genericOp.getOperation();