diff --git a/mlir/lib/Dialect/Linalg/Transforms/ElementwiseToLinalg.cpp b/mlir/lib/Dialect/Linalg/Transforms/ElementwiseToLinalg.cpp index a0e5d74e1767..8ee1b389dee8 100644 --- a/mlir/lib/Dialect/Linalg/Transforms/ElementwiseToLinalg.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/ElementwiseToLinalg.cpp @@ -26,8 +26,8 @@ static bool isElementwiseMappableOpOnRankedTensors(Operation *op) { } namespace { -struct ConvertStdElementwiseOpOnRankedTensors : public RewritePattern { - ConvertStdElementwiseOpOnRankedTensors() +struct ConvertAnyElementwiseMappableOpOnRankedTensors : public RewritePattern { + ConvertAnyElementwiseMappableOpOnRankedTensors() : RewritePattern(/*benefit=*/1, MatchAnyOpTypeTag()) {} LogicalResult matchAndRewrite(Operation *op, PatternRewriter &rewriter) const final { @@ -68,7 +68,7 @@ struct ConvertStdElementwiseOpOnRankedTensors : public RewritePattern { void mlir::populateElementwiseToLinalgConversionPatterns( OwningRewritePatternList &patterns, MLIRContext *) { - patterns.insert(); + patterns.insert(); } namespace {