CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
202 lines
4.3 KiB
MLIR
202 lines
4.3 KiB
MLIR
// RUN: mlir-opt %s -verify-diagnostics -split-input-file
|
|
|
|
// Testing invalid IRDL IRs
|
|
|
|
irdl.dialect @testd {
|
|
irdl.type @type {
|
|
%0 = irdl.any
|
|
// expected-error@+1 {{expected valid keyword}}
|
|
irdl.parameters(%0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
irdl.type @type {
|
|
%0 = irdl.any
|
|
// expected-error@+1 {{expected valid keyword}}
|
|
irdl.parameters(123: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
irdl.type @type {
|
|
%0 = irdl.any
|
|
// expected-error@+1 {{name of parameter #0 must contain only lowercase letters, digits and underscores}}
|
|
irdl.parameters(test$test: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
irdl.operation @op {
|
|
%0 = irdl.any
|
|
// expected-error@+1 {{name of result #0 must contain only lowercase letters, digits and underscores}}
|
|
irdl.results(test$test: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
irdl.operation @op {
|
|
%0 = irdl.any
|
|
// expected-error@+1 {{name of operand #0 must contain only lowercase letters, digits and underscores}}
|
|
irdl.operands(test$test: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
irdl.type @type {
|
|
%0 = irdl.any
|
|
// expected-error@+1 {{name of parameter #2 is a duplicate of the name of parameter #0}}
|
|
irdl.parameters(foo: %0, bar: %0, foo: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
irdl.operation @op {
|
|
%0 = irdl.any
|
|
// expected-error@+1 {{name of result #2 is a duplicate of the name of result #0}}
|
|
irdl.results(foo: %0, bar: %0, foo: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
irdl.operation @op {
|
|
%0 = irdl.any
|
|
// expected-error@+1 {{name of operand #2 is a duplicate of the name of operand #0}}
|
|
irdl.operands(foo: %0, bar: %0, foo: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
// expected-error@+1 {{contains a value named 'foo' for both its operands and results}}
|
|
irdl.operation @op {
|
|
%0 = irdl.any
|
|
irdl.operands(foo: %0)
|
|
irdl.results(foo: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
// expected-error@+1 {{contains a value named 'bar' for both its regions and results}}
|
|
irdl.operation @op {
|
|
%0 = irdl.any
|
|
%1 = irdl.region
|
|
irdl.regions(bar: %1)
|
|
irdl.results(bar: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
// expected-error@+1 {{contains a value named 'baz' for both its regions and operands}}
|
|
irdl.operation @op {
|
|
%0 = irdl.any
|
|
%1 = irdl.region
|
|
irdl.regions(baz: %1)
|
|
irdl.operands(baz: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
// expected-error@+1 {{contains a value named 'baz' for both its regions and results}}
|
|
irdl.operation @op {
|
|
%0 = irdl.any
|
|
%1 = irdl.region
|
|
irdl.regions(baz: %1)
|
|
irdl.operands(qux: %0)
|
|
irdl.results(baz: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
irdl.type @type {
|
|
// expected-error@+1 {{symbol '@foo' not found}}
|
|
%0 = irdl.base @foo
|
|
irdl.parameters(foo: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
irdl.type @type {
|
|
// expected-error@+1 {{the base type or attribute name should start with '!' or '#'}}
|
|
%0 = irdl.base "builtin.integer"
|
|
irdl.parameters(foo: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
irdl.type @type {
|
|
// expected-error@+1 {{the base type or attribute name should start with '!' or '#'}}
|
|
%0 = irdl.base ""
|
|
irdl.parameters(foo: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
irdl.dialect @testd {
|
|
irdl.type @type {
|
|
// expected-error@+1 {{the base type or attribute should be specified by either a name}}
|
|
%0 = irdl.base
|
|
irdl.parameters(foo: %0)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func private @not_a_type_or_attr()
|
|
|
|
irdl.dialect @invalid_parametric {
|
|
irdl.operation @foo {
|
|
// expected-error@+1 {{symbol '@not_a_type_or_attr' does not refer to a type or attribute definition}}
|
|
%param = irdl.parametric @not_a_type_or_attr<>
|
|
irdl.results(foo: %param)
|
|
}
|
|
}
|
|
|
|
// -----
|
|
|
|
// Regression test for https://github.com/llvm/llvm-project/issues/159673
|
|
// A self-referencing IRDL parametric type combined with duplicate function
|
|
// symbols in the enclosing module used to crash with a SymbolTable assertion
|
|
// instead of producing a proper "redefinition of symbol" diagnostic.
|
|
|
|
irdl.dialect @testd {
|
|
irdl.type @self_referencing {
|
|
%0 = irdl.any
|
|
%1 = irdl.parametric @testd::@self_referencing<%0>
|
|
irdl.parameters(foo: %1)
|
|
}
|
|
}
|
|
|
|
// expected-note@+1 {{see existing symbol definition here}}
|
|
func.func @test() { return }
|
|
// expected-error@+1 {{redefinition of symbol named 'test'}}
|
|
func.func @test() { return }
|