1 // RUN: mlir-opt --mlir-disable-threading -split-input-file -verify-diagnostics %s
3 func.func @verify_operand_type() {
4 %0 = arith.constant 1 : index
5 // expected-error@+1 {{op operand #0 must be 32-bit signless integer, but got 'index'}}
6 "test.verifiers"(%0) ({
7 %1 = arith.constant 2 : index
14 func.func @verify_nested_op_block_trait() {
15 %0 = arith.constant 1 : i32
16 // expected-remark@+1 {{success run of verifier}}
17 "test.verifiers"(%0) ({
18 %1 = arith.constant 2 : index
19 // expected-error@+1 {{op requires one region}}
20 "test.verifiers"(%1) : (index) -> ()
27 func.func @verify_nested_op_operand() {
28 %0 = arith.constant 1 : i32
29 // expected-remark@+1 {{success run of verifier}}
30 "test.verifiers"(%0) ({
31 %1 = arith.constant 2 : index
32 // expected-error@+1 {{op operand #0 must be 32-bit signless integer, but got 'index'}}
33 "test.verifiers"(%1) ({
34 %2 = arith.constant 3 : index
42 func.func @verify_nested_isolated_above() {
43 %0 = arith.constant 1 : i32
44 // expected-remark@+1 {{success run of verifier}}
45 "test.verifiers"(%0) ({
46 // expected-remark@-1 {{success run of region verifier}}
47 %1 = arith.constant 2 : i32
48 // expected-remark@+1 {{success run of verifier}}
49 "test.verifiers"(%1) ({
50 // expected-remark@-1 {{success run of region verifier}}
51 %2 = arith.constant 3 : index