Changeset View
Changeset View
Standalone View
Standalone View
mlir/test/Dialect/PDL/invalid.mlir
// RUN: mlir-opt %s -split-input-file -verify-diagnostics | // RUN: mlir-opt %s -split-input-file -verify-diagnostics | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// pdl::ApplyConstraintOp | // pdl::ApplyNativeConstraintOp | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
pdl.pattern : benefit(1) { | pdl.pattern : benefit(1) { | ||||
%op = pdl.operation "foo.op" | %op = pdl.operation "foo.op" | ||||
// expected-error@below {{expected at least one argument}} | // expected-error@below {{expected at least one argument}} | ||||
"pdl.apply_constraint"() {name = "foo", params = []} : () -> () | "pdl.apply_native_constraint"() {name = "foo", params = []} : () -> () | ||||
pdl.rewrite %op with "rewriter" | pdl.rewrite %op with "rewriter" | ||||
} | } | ||||
// ----- | // ----- | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// pdl::ApplyNativeRewriteOp | |||||
//===----------------------------------------------------------------------===// | |||||
pdl.pattern : benefit(1) { | |||||
%op = pdl.operation "foo.op" | |||||
pdl.rewrite %op { | |||||
// expected-error@below {{expected at least one argument}} | |||||
"pdl.apply_native_rewrite"() {name = "foo", params = []} : () -> () | |||||
} | |||||
} | |||||
// ----- | |||||
//===----------------------------------------------------------------------===// | |||||
// pdl::AttributeOp | // pdl::AttributeOp | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
pdl.pattern : benefit(1) { | pdl.pattern : benefit(1) { | ||||
%type = pdl.type | %type = pdl.type | ||||
// expected-error@below {{expected only one of [`type`, `value`] to be set}} | // expected-error@below {{expected only one of [`type`, `value`] to be set}} | ||||
%attr = pdl.attribute : %type 10 | %attr = pdl.attribute : %type 10 | ||||
▲ Show 20 Lines • Show All 200 Lines • Show Last 20 Lines |