1 // RUN: mlir-opt -split-input-file -verify-diagnostics %s
3 test.op_with_property_predicates <{
7 more_constrained = 4 : i64,
9 non_empty_unconstrained = [5: i64],
10 non_empty_constrained = [6 : i64],
11 non_empty_optional = [[7 : i64]],
12 unconstrained = 8 : i64}>
16 test.op_with_property_predicates <{
18 more_constrained = 4 : i64,
20 non_empty_unconstrained = [5: i64],
21 non_empty_constrained = [6 : i64],
22 unconstrained = 8 : i64}>
26 // expected-error @+1 {{'test.op_with_property_predicates' op property 'scalar' failed to satisfy constraint: non-negative int64_t}}
27 test.op_with_property_predicates <{
31 more_constrained = 4 : i64,
33 non_empty_unconstrained = [5: i64],
34 non_empty_constrained = [6 : i64],
35 non_empty_optional = [[7 : i64]],
36 unconstrained = 8 : i64}>
40 // expected-error @+1 {{'test.op_with_property_predicates' op property 'optional' failed to satisfy constraint: optional non-negative int64_t}}
41 test.op_with_property_predicates <{
43 optional = [-1 : i64],
45 more_constrained = 4 : i64,
47 non_empty_unconstrained = [5: i64],
48 non_empty_constrained = [6 : i64],
49 non_empty_optional = [[7 : i64]],
50 unconstrained = 8 : i64}>
54 // expected-error @+1 {{'test.op_with_property_predicates' op property 'defaulted' failed to satisfy constraint: non-negative int64_t}}
55 test.op_with_property_predicates <{
59 more_constrained = 4 : i64,
61 non_empty_unconstrained = [5: i64],
62 non_empty_constrained = [6 : i64],
63 non_empty_optional = [[7 : i64]],
64 unconstrained = 8 : i64}>
68 // expected-error @+1 {{'test.op_with_property_predicates' op property 'more_constrained' failed to satisfy constraint: between 0 and 5}}
69 test.op_with_property_predicates <{
73 more_constrained = 100 : i64,
75 non_empty_unconstrained = [5: i64],
76 non_empty_constrained = [6 : i64],
77 non_empty_optional = [[7 : i64]],
78 unconstrained = 8 : i64}>
82 // expected-error @+1 {{'test.op_with_property_predicates' op property 'array' failed to satisfy constraint: array of non-negative int64_t}}
83 test.op_with_property_predicates <{
87 more_constrained = 4 : i64,
89 non_empty_unconstrained = [5: i64],
90 non_empty_constrained = [6 : i64],
91 non_empty_optional = [[7 : i64]],
92 unconstrained = 8 : i64}>
96 // expected-error @+1 {{'test.op_with_property_predicates' op property 'non_empty_unconstrained' failed to satisfy constraint: non-empty array of int64_t}}
97 test.op_with_property_predicates <{
101 more_constrained = 4 : i64,
103 non_empty_unconstrained = [],
104 non_empty_constrained = [6 : i64],
105 non_empty_optional = [[7 : i64]],
106 unconstrained = 8 : i64}>
110 // expected-error @+1 {{'test.op_with_property_predicates' op property 'non_empty_constrained' failed to satisfy constraint: non-empty array of non-negative int64_t}}
111 test.op_with_property_predicates <{
113 optional = [2 : i64],
115 more_constrained = 4 : i64,
117 non_empty_unconstrained = [5: i64],
118 non_empty_constrained = [],
119 non_empty_optional = [[7 : i64]],
120 unconstrained = 8 : i64}>
124 // expected-error @+1 {{'test.op_with_property_predicates' op property 'non_empty_constrained' failed to satisfy constraint: non-empty array of non-negative int64_t}}
125 test.op_with_property_predicates <{
127 optional = [2 : i64],
129 more_constrained = 4 : i64,
131 non_empty_unconstrained = [5: i64],
132 non_empty_constrained = [-1 : i64],
133 non_empty_optional = [[7 : i64]],
134 unconstrained = 8 : i64}>
138 // expected-error @+1 {{'test.op_with_property_predicates' op property 'non_empty_optional' failed to satisfy constraint: optional non-empty array of non-negative int64_t}}
139 test.op_with_property_predicates <{
141 optional = [2 : i64],
143 more_constrained = 4 : i64,
145 non_empty_unconstrained = [5: i64],
146 non_empty_constrained = [6 : i64],
147 non_empty_optional = [[]],
148 unconstrained = 8 : i64}>