Files
clang-p2996/mlir/test/Dialect/Transform/test-dialect-injection.mlir
Alex Zinenko 46af120e15 [mlir] don't hardcode PDL_Operation in TestTransformDialectExtensions
Update operations in Transform dialect extensions used for testing to
use the more generic `TransformHandleTypeInterface` type constraint
instead of hardcoding `PDL_Operation`. See
https://discourse.llvm.org/t/rfc-type-system-for-the-transform-dialect/65702
for motivation. This is particularly important as these tests are often
used as source of best practices.

Update tests to use `!transform.any_op` instead of `!pdl.operation`.

Depends On D150785

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D150786
2023-05-22 08:19:49 +00:00

18 lines
793 B
MLIR

// RUN: mlir-opt %s | FileCheck %s
// These types and ops are defined by a test extension but should be okay to
// roundtrip.
// CHECK: transform.test_transform_op
transform.test_transform_op
// CHECK: = transform.test_produce_self_handle_or_forward_operand {foo = "bar"}
%0 = transform.test_produce_self_handle_or_forward_operand { foo = "bar" } : () -> !transform.any_op
// CHECK: transform.test_consume_operand_of_op_kind_or_fail %{{.*}},
transform.test_consume_operand_of_op_kind_or_fail %0, "transform.test_produce_self_handle_or_forward_operand" : !transform.any_op
// Ensure that the extension type is roundtripped correctly.
// CHECK: transform.cast %{{.*}} : !transform.any_op to !transform.test_dialect_op
%1 = transform.cast %0: !transform.any_op to !transform.test_dialect_op