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
127 lines
4.5 KiB
MLIR
127 lines
4.5 KiB
MLIR
// RUN: mlir-opt %s | mlir-opt -test-greedy-patterns | FileCheck %s
|
|
|
|
// CHECK-LABEL: @test_enum_attr_roundtrip
|
|
func.func @test_enum_attr_roundtrip() -> () {
|
|
// CHECK: value = #test<enum first>
|
|
"test.op"() {value = #test<enum first>} : () -> ()
|
|
// CHECK: value = #test<enum second>
|
|
"test.op"() {value = #test<enum second>} : () -> ()
|
|
// CHECK: value = #test<enum third>
|
|
"test.op"() {value = #test<enum third>} : () -> ()
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: @test_op_with_enum
|
|
func.func @test_op_with_enum() -> () {
|
|
// CHECK: test.op_with_enum third
|
|
test.op_with_enum third
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: @test_match_op_with_enum
|
|
func.func @test_match_op_with_enum() -> () {
|
|
// CHECK: test.op_with_enum third tag 0 : i32
|
|
test.op_with_enum third tag 0 : i32
|
|
// CHECK: test.op_with_enum second tag 1 : i32
|
|
test.op_with_enum first tag 0 : i32
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: @test_match_op_with_bit_enum
|
|
func.func @test_match_op_with_bit_enum() -> () {
|
|
// CHECK: test.op_with_bit_enum <write> tag 0 : i32
|
|
test.op_with_bit_enum <write> tag 0 : i32
|
|
// CHECK: test.op_with_bit_enum <read, execute> tag 1 : i32
|
|
test.op_with_bit_enum <execute, write> tag 0 : i32
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: @test_enum_prop
|
|
func.func @test_enum_prop() -> () {
|
|
// CHECK: test.op_with_enum_prop first
|
|
test.op_with_enum_prop first
|
|
|
|
// CHECK: test.op_with_enum_prop first
|
|
"test.op_with_enum_prop"() <{value = 0 : i32}> {} : () -> ()
|
|
|
|
// CHECK: test.op_with_enum_prop_attr_form <{value = 0 : i32}>
|
|
test.op_with_enum_prop_attr_form <{value = 0 : i32}>
|
|
// CHECK: test.op_with_enum_prop_attr_form <{value = 1 : i32}>
|
|
test.op_with_enum_prop_attr_form <{value = #test<enum second>}>
|
|
|
|
// CHECK: test.op_with_enum_prop_attr_form_always <{value = #test<enum first>}>
|
|
test.op_with_enum_prop_attr_form_always <{value = #test<enum first>}>
|
|
// CHECK: test.op_with_enum_prop_attr_form_always <{value = #test<enum second>}
|
|
test.op_with_enum_prop_attr_form_always <{value = #test<enum second>}>
|
|
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: @test_two_default_enum_props
|
|
func.func @test_two_default_enum_props() -> () {
|
|
// Both default: both elided.
|
|
// CHECK: test.op_with_two_default_enum_props{{$}}
|
|
test.op_with_two_default_enum_props
|
|
|
|
// value1 non-default, value2 default (dog): only value1 printed.
|
|
// CHECK: test.op_with_two_default_enum_props second{{$}}
|
|
test.op_with_two_default_enum_props second
|
|
|
|
// value1 default (first), value2 non-default: only value2 printed.
|
|
// Key test: value1 parser must not consume "cat" (not a TestEnum keyword).
|
|
// CHECK: test.op_with_two_default_enum_props cat{{$}}
|
|
test.op_with_two_default_enum_props cat
|
|
|
|
// Both non-default.
|
|
// CHECK: test.op_with_two_default_enum_props second cat{{$}}
|
|
test.op_with_two_default_enum_props second cat
|
|
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: @test_two_default_bit_enum_props
|
|
func.func @test_two_default_bit_enum_props() -> () {
|
|
// Both default: both elided.
|
|
// CHECK: test.op_with_two_default_bit_enum_props{{$}}
|
|
test.op_with_two_default_bit_enum_props
|
|
|
|
// value1 non-default (write), value2 default (user): only value1 printed.
|
|
// CHECK: test.op_with_two_default_bit_enum_props write{{$}}
|
|
test.op_with_two_default_bit_enum_props write
|
|
|
|
// value1 default (read), value2 non-default: only value2 printed.
|
|
// Key test: value1 parser must not consume "group" (not a TestBitEnum keyword).
|
|
// CHECK: test.op_with_two_default_bit_enum_props group{{$}}
|
|
test.op_with_two_default_bit_enum_props group
|
|
|
|
// Both non-default.
|
|
// CHECK: test.op_with_two_default_bit_enum_props write group{{$}}
|
|
test.op_with_two_default_bit_enum_props write group
|
|
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL @test_bit_enum_prop()
|
|
func.func @test_bit_enum_prop() -> () {
|
|
// CHECK: test.op_with_bit_enum_prop read : ()
|
|
test.op_with_bit_enum_prop read read : ()
|
|
|
|
// CHECK: test.op_with_bit_enum_prop read, write write, execute
|
|
test.op_with_bit_enum_prop read, write write, execute : ()
|
|
|
|
// CHECK: test.op_with_bit_enum_prop read, execute write
|
|
"test.op_with_bit_enum_prop"() <{value1 = 5 : i32, value2 = 2 : i32}> {} : () -> ()
|
|
|
|
// CHECK: test.op_with_bit_enum_prop read, write, execute
|
|
test.op_with_bit_enum_prop read, write, execute : ()
|
|
|
|
// CHECK: test.op_with_bit_enum_prop_named bit_enum<read>{{$}}
|
|
test.op_with_bit_enum_prop_named bit_enum<read> bit_enum<read>
|
|
// CHECK: test.op_with_bit_enum_prop_named bit_enum<read, write> bit_enum<write, execute>
|
|
test.op_with_bit_enum_prop_named bit_enum<read, write> bit_enum<write, execute>
|
|
// CHECK: test.op_with_bit_enum_prop_named bit_enum<read, write, execute>
|
|
test.op_with_bit_enum_prop_named bit_enum<read, write, execute>
|
|
|
|
return
|
|
}
|