blob: e1ef6f196bd5e0b58e0a68fae6e207ec7e3b32c1 [file] [log] [blame]
// RUN: mlir-opt %s -allow-unregistered-dialect | mlir-opt -allow-unregistered-dialect
//===----------------------------------------------------------------------===//
// UnrealizedConversionCastOp
//===----------------------------------------------------------------------===//
%operand = "foo.op"() : () -> !foo.type
%tuple_operand = "foo.op"() : () -> !foo.tuple_type<!foo.type, !foo.type>
// An unrealized 0-1 conversion.
%result = unrealized_conversion_cast to !bar.tuple_type<>
// An unrealized 1-1 conversion.
%result1 = unrealized_conversion_cast %operand : !foo.type to !bar.lowered_type
// An unrealized 1-N conversion.
%results2:2 = unrealized_conversion_cast %tuple_operand : !foo.tuple_type<!foo.type, !foo.type> to !foo.type, !foo.type
// An unrealized N-1 conversion.
%result3 = unrealized_conversion_cast %operand, %operand : !foo.type, !foo.type to !bar.tuple_type<!foo.type, !foo.type>