diff --git a/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td b/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td --- a/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td +++ b/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td @@ -187,8 +187,7 @@ default type converter specify their own type converter.) The `legal_ops`, `illegal_ops`, `legal_dialects`, `illegal_dialects` - attributes specify the conversion target. At least one of those four - attributes must be specified. + attributes specify the conversion target. This transform consumes the `target` handle and modifies the payload. It does not produce any handles. diff --git a/mlir/lib/Dialect/Transform/IR/TransformOps.cpp b/mlir/lib/Dialect/Transform/IR/TransformOps.cpp --- a/mlir/lib/Dialect/Transform/IR/TransformOps.cpp +++ b/mlir/lib/Dialect/Transform/IR/TransformOps.cpp @@ -612,9 +612,6 @@ } } } - if (!getLegalOps() && !getIllegalOps() && !getLegalDialects() && - !getIllegalDialects()) - return emitOpError() << "conversion target is not specified"; return success(); } diff --git a/mlir/test/Dialect/Transform/test-pattern-application.mlir b/mlir/test/Dialect/Transform/test-pattern-application.mlir --- a/mlir/test/Dialect/Transform/test-pattern-application.mlir +++ b/mlir/test/Dialect/Transform/test-pattern-application.mlir @@ -307,19 +307,6 @@ // ----- -transform.sequence failures(propagate) { -^bb1(%arg1: !transform.any_op): - %0 = transform.structured.match ops{["func.func"]} in %arg1 : (!transform.any_op) -> !transform.any_op - // expected-error @below{{conversion target is not specified}} - transform.apply_conversion_patterns to %0 { - transform.apply_conversion_patterns.transform.test_conversion_patterns - } with type_converter { - transform.apply_conversion_patterns.transform.test_type_converter - } : !transform.any_op -} - -// ----- - transform.sequence failures(propagate) { ^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["func.func"]} in %arg1 : (!transform.any_op) -> !transform.any_op