diff --git a/mlir/test/Dialect/EmitC/invalid_ops.mlir b/mlir/test/Dialect/EmitC/invalid_ops.mlir index 9ff1f8a0ad850d..865e2dcf52724b 100644 --- a/mlir/test/Dialect/EmitC/invalid_ops.mlir +++ b/mlir/test/Dialect/EmitC/invalid_ops.mlir @@ -66,7 +66,7 @@ func @dense_template_argument(%arg : i32) { func @empty_operator(%arg : i32) { // expected-error @+1 {{'emitc.apply' op applicable operator must not be empty}} - %2 = emitc.apply ""(%arg) : (i32) -> !emitc.opaque<"int32_t*"> + %2 = emitc.apply ""(%arg) : (i32) -> !emitc.ptr return } @@ -74,7 +74,7 @@ func @empty_operator(%arg : i32) { func @illegal_operator(%arg : i32) { // expected-error @+1 {{'emitc.apply' op applicable operator is illegal}} - %2 = emitc.apply "+"(%arg) : (i32) -> !emitc.opaque<"int32_t*"> + %2 = emitc.apply "+"(%arg) : (i32) -> !emitc.ptr return } @@ -89,7 +89,7 @@ func @var_attribute_return_type_1() { // ----- func @var_attribute_return_type_2() { - // expected-error @+1 {{'emitc.variable' op requires attribute's type ('!emitc.opaque<"int32_t*">') to match op's return type ('!emitc.opaque<"int32_t">')}} - %c0 = "emitc.variable"(){value = "nullptr" : !emitc.opaque<"int32_t*">} : () -> !emitc.opaque<"int32_t"> + // expected-error @+1 {{'emitc.variable' op requires attribute's type ('!emitc.ptr') to match op's return type ('!emitc.ptr')}} + %c0 = "emitc.variable"(){value = "nullptr" : !emitc.ptr} : () -> !emitc.ptr return } diff --git a/mlir/test/Dialect/EmitC/ops.mlir b/mlir/test/Dialect/EmitC/ops.mlir index f6526cbaa0251d..98bd919cbf35e4 100644 --- a/mlir/test/Dialect/EmitC/ops.mlir +++ b/mlir/test/Dialect/EmitC/ops.mlir @@ -18,7 +18,7 @@ func @c() { } func @a(%arg0: i32, %arg1: i32) { - %1 = "emitc.apply"(%arg0) {applicableOperator = "&"} : (i32) -> !emitc.opaque<"int32_t*"> - %2 = emitc.apply "&"(%arg1) : (i32) -> !emitc.opaque<"int32_t*"> + %1 = "emitc.apply"(%arg0) {applicableOperator = "&"} : (i32) -> !emitc.ptr + %2 = emitc.apply "&"(%arg1) : (i32) -> !emitc.ptr return }