diff options
Diffstat (limited to 'mlir/test/Dialect/IRDL/testd.mlir')
-rw-r--r-- | mlir/test/Dialect/IRDL/testd.mlir | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/mlir/test/Dialect/IRDL/testd.mlir b/mlir/test/Dialect/IRDL/testd.mlir index f6d1bcb0e396..e9be54b60d0b 100644 --- a/mlir/test/Dialect/IRDL/testd.mlir +++ b/mlir/test/Dialect/IRDL/testd.mlir @@ -45,6 +45,13 @@ func.func @succeededEqConstraint() { return } +// ----- + +func.func @failedEqConstraint() { + // expected-error@+1 {{expected 'i32' but got 'i64'}} + "testd.eq"() : () -> i64 + return +} // ----- @@ -74,6 +81,13 @@ func.func @succeededDynBaseConstraint() { return } +// ----- + +func.func @failedDynBaseConstraint() { + // expected-error@+1 {{expected base type 'testd.parametric' but got 'i32'}} + "testd.dynbase"() : () -> i32 + return +} // ----- @@ -89,6 +103,22 @@ func.func @succeededDynParamsConstraint() { // ----- +func.func @failedDynParamsConstraintBase() { + // expected-error@+1 {{expected base type 'testd.parametric' but got 'i32'}} + "testd.dynparams"() : () -> i32 + return +} + +// ----- + +func.func @failedDynParamsConstraintParam() { + // expected-error@+1 {{expected 'i32' but got 'i1'}} + "testd.dynparams"() : () -> !testd.parametric<i1> + return +} + +// ----- + //===----------------------------------------------------------------------===// // Constraint variables //===----------------------------------------------------------------------===// @@ -106,3 +136,11 @@ func.func @succeededConstraintVars2() { "testd.constraint_vars"() : () -> (i64, i64) return } + +// ----- + +func.func @failedConstraintVars() { + // expected-error@+1 {{expected 'i64' but got 'i32'}} + "testd.constraint_vars"() : () -> (i64, i32) + return +} |