brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.5 KiB · 3a4e297 Raw
149 lines · plain
1// RUN: mlir-opt -split-input-file -verify-diagnostics %s2 3test.op_with_property_predicates <{4  scalar = 1 : i64,5  optional = [2 : i64],6  defaulted = 3 : i64,7  more_constrained = 4 : i64,8  array = [],9  non_empty_unconstrained = [5: i64],10  non_empty_constrained = [6 : i64],11  non_empty_optional = [[7 : i64]],12  unconstrained = 8 : i64}>13 14// -----15 16test.op_with_property_predicates <{17  scalar = 1 : i64,18  more_constrained = 4 : i64,19  array = [],20  non_empty_unconstrained = [5: i64],21  non_empty_constrained = [6 : i64],22  unconstrained = 8 : i64}>23 24// -----25 26// expected-error @+1 {{'test.op_with_property_predicates' op property 'scalar' failed to satisfy constraint: non-negative int64_t}}27test.op_with_property_predicates <{28  scalar = -1 : i64,29  optional = [2 : i64],30  defaulted = 3 : i64,31  more_constrained = 4 : i64,32  array = [],33  non_empty_unconstrained = [5: i64],34  non_empty_constrained = [6 : i64],35  non_empty_optional = [[7 : i64]],36  unconstrained = 8 : i64}>37 38// -----39 40// expected-error @+1 {{'test.op_with_property_predicates' op property 'optional' failed to satisfy constraint: optional non-negative int64_t}}41test.op_with_property_predicates <{42  scalar = 1 : i64,43  optional = [-1 : i64],44  defaulted = 3 : i64,45  more_constrained = 4 : i64,46  array = [],47  non_empty_unconstrained = [5: i64],48  non_empty_constrained = [6 : i64],49  non_empty_optional = [[7 : i64]],50  unconstrained = 8 : i64}>51 52// -----53 54// expected-error @+1 {{'test.op_with_property_predicates' op property 'defaulted' failed to satisfy constraint: non-negative int64_t}}55test.op_with_property_predicates <{56  scalar = 1 : i64,57  optional = [2 : i64],58  defaulted = -1 : i64,59  more_constrained = 4 : i64,60  array = [],61  non_empty_unconstrained = [5: i64],62  non_empty_constrained = [6 : i64],63  non_empty_optional = [[7 : i64]],64  unconstrained = 8 : i64}>65 66// -----67 68// expected-error @+1 {{'test.op_with_property_predicates' op property 'more_constrained' failed to satisfy constraint: between 0 and 5}}69test.op_with_property_predicates <{70  scalar = 1 : i64,71  optional = [2 : i64],72  defaulted = 3 : i64,73  more_constrained = 100 : i64,74  array = [],75  non_empty_unconstrained = [5: i64],76  non_empty_constrained = [6 : i64],77  non_empty_optional = [[7 : i64]],78  unconstrained = 8 : i64}>79 80// -----81 82// expected-error @+1 {{'test.op_with_property_predicates' op property 'array' failed to satisfy constraint: array of non-negative int64_t}}83test.op_with_property_predicates <{84  scalar = 1 : i64,85  optional = [2 : i64],86  defaulted = 3 : i64,87  more_constrained = 4 : i64,88  array = [-1 : i64],89  non_empty_unconstrained = [5: i64],90  non_empty_constrained = [6 : i64],91  non_empty_optional = [[7 : i64]],92  unconstrained = 8 : i64}>93 94// -----95 96// expected-error @+1 {{'test.op_with_property_predicates' op property 'non_empty_unconstrained' failed to satisfy constraint: non-empty array of int64_t}}97test.op_with_property_predicates <{98  scalar = 1 : i64,99  optional = [2 : i64],100  defaulted = 3 : i64,101  more_constrained = 4 : i64,102  array = [],103  non_empty_unconstrained = [],104  non_empty_constrained = [6 : i64],105  non_empty_optional = [[7 : i64]],106  unconstrained = 8 : i64}>107 108// -----109 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}}111test.op_with_property_predicates <{112  scalar = 1 : i64,113  optional = [2 : i64],114  defaulted = 3 : i64,115  more_constrained = 4 : i64,116  array = [],117  non_empty_unconstrained = [5: i64],118  non_empty_constrained = [],119  non_empty_optional = [[7 : i64]],120  unconstrained = 8 : i64}>121 122// -----123 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}}125test.op_with_property_predicates <{126  scalar = 1 : i64,127  optional = [2 : i64],128  defaulted = 3 : i64,129  more_constrained = 4 : i64,130  array = [],131  non_empty_unconstrained = [5: i64],132  non_empty_constrained = [-1 : i64],133  non_empty_optional = [[7 : i64]],134  unconstrained = 8 : i64}>135 136// -----137 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}}139test.op_with_property_predicates <{140  scalar = 1 : i64,141  optional = [2 : i64],142  defaulted = 3 : i64,143  more_constrained = 4 : i64,144  array = [],145  non_empty_unconstrained = [5: i64],146  non_empty_constrained = [6 : i64],147  non_empty_optional = [[]],148  unconstrained = 8 : i64}>149