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
116 lines
2.5 KiB
MLIR
116 lines
2.5 KiB
MLIR
// RUN: mlir-opt -allow-unregistered-dialect %s -split-input-file -verify-diagnostics | FileCheck %s
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Test the number of regions
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
func.func @correct_number_of_regions() {
|
|
// CHECK: test.two_region_op
|
|
"test.two_region_op"()(
|
|
{"work"() : () -> ()},
|
|
{"work"() : () -> ()}
|
|
) : () -> ()
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func @missing_regions() {
|
|
// expected-error@+1 {{expected 2 regions}}
|
|
"test.two_region_op"()(
|
|
{"work"() : () -> ()}
|
|
) : () -> ()
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
func.func @extra_regions() {
|
|
// expected-error@+1 {{expected 2 regions}}
|
|
"test.two_region_op"()(
|
|
{"work"() : () -> ()},
|
|
{"work"() : () -> ()},
|
|
{"work"() : () -> ()}
|
|
) : () -> ()
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Test SizedRegion
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
func.func @unnamed_region_has_wrong_number_of_blocks() {
|
|
// expected-error@+1 {{region #1 failed to verify constraint: region with 1 blocks}}
|
|
"test.sized_region_op"() (
|
|
{
|
|
"work"() : () -> ()
|
|
cf.br ^next1
|
|
^next1:
|
|
"work"() : () -> ()
|
|
},
|
|
{
|
|
"work"() : () -> ()
|
|
cf.br ^next2
|
|
^next2:
|
|
"work"() : () -> ()
|
|
}) : () -> ()
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
// Test region name in error message
|
|
func.func @named_region_has_wrong_number_of_blocks() {
|
|
// expected-error@+1 {{region #0 ('my_region') failed to verify constraint: region with 2 blocks}}
|
|
"test.sized_region_op"() (
|
|
{
|
|
"work"() : () -> ()
|
|
},
|
|
{
|
|
"work"() : () -> ()
|
|
}) : () -> ()
|
|
return
|
|
}
|
|
|
|
// -----
|
|
|
|
// Region with single block and not terminator.
|
|
// CHECK: unregistered_without_terminator
|
|
"test.unregistered_without_terminator"() ({
|
|
^bb0:
|
|
}) : () -> ()
|
|
|
|
// -----
|
|
|
|
// CHECK: test.single_no_terminator_op
|
|
"test.single_no_terminator_op"() (
|
|
{
|
|
%foo = arith.constant 1 : i32
|
|
}
|
|
) : () -> ()
|
|
|
|
// CHECK: test.variadic_no_terminator_op
|
|
"test.variadic_no_terminator_op"() (
|
|
{
|
|
%foo = arith.constant 1 : i32
|
|
},
|
|
{
|
|
%bar = arith.constant 1 : i32
|
|
}
|
|
) : () -> ()
|
|
|
|
// CHECK: test.single_no_terminator_custom_asm_op
|
|
// CHECK-NEXT: important_dont_drop
|
|
test.single_no_terminator_custom_asm_op {
|
|
"important_dont_drop"() : () -> ()
|
|
}
|
|
|
|
// -----
|
|
|
|
// CHECK: test.dummy_op_with_region_ref
|
|
test.dummy_op_with_region_ref {
|
|
^bb0:
|
|
}
|