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
58 lines
1.9 KiB
MLIR
58 lines
1.9 KiB
MLIR
// RUN: fir-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
|
|
|
|
// Check that we cleanup unused pure operations from the parallel and single
|
|
// regions
|
|
|
|
// CHECK-LABEL: func.func @wsfunc() {
|
|
// CHECK: %[[VAL_0:.*]] = fir.alloca i32
|
|
// CHECK: omp.parallel {
|
|
// CHECK: omp.single {
|
|
// CHECK: %[[VAL_1:.*]] = "test.test1"() : () -> i32
|
|
// CHECK: %[[VAL_2:.*]] = arith.constant 2 : index
|
|
// CHECK: %[[VAL_3:.*]] = arith.constant 3 : index
|
|
// CHECK: %[[VAL_4:.*]] = arith.addi %[[VAL_2]], %[[VAL_3]] : index
|
|
// CHECK: "test.test3"(%[[VAL_4]]) : (index) -> ()
|
|
// CHECK: omp.terminator
|
|
// CHECK: }
|
|
// CHECK: %[[VAL_5:.*]] = arith.constant 1 : index
|
|
// CHECK: %[[VAL_6:.*]] = arith.constant 42 : index
|
|
// CHECK: omp.wsloop nowait {
|
|
// CHECK: omp.loop_nest (%[[VAL_7:.*]]) : index = (%[[VAL_5]]) to (%[[VAL_6]]) inclusive step (%[[VAL_5]]) {
|
|
// CHECK: "test.test2"() : () -> ()
|
|
// CHECK: omp.yield
|
|
// CHECK: }
|
|
// CHECK: }
|
|
// CHECK: omp.barrier
|
|
// CHECK: omp.terminator
|
|
// CHECK: }
|
|
// CHECK: return
|
|
// CHECK: }
|
|
func.func @wsfunc() {
|
|
%a = fir.alloca i32
|
|
omp.parallel {
|
|
omp.workshare {
|
|
%t1 = "test.test1"() : () -> i32
|
|
|
|
%c1 = arith.constant 1 : index
|
|
%c42 = arith.constant 42 : index
|
|
|
|
%c2 = arith.constant 2 : index
|
|
%c3 = arith.constant 3 : index
|
|
%add = arith.addi %c2, %c3 : index
|
|
"test.test3"(%add) : (index) -> ()
|
|
|
|
omp.workshare.loop_wrapper {
|
|
omp.loop_nest (%arg1) : index = (%c1) to (%c42) inclusive step (%c1) {
|
|
"test.test2"() : () -> ()
|
|
omp.yield
|
|
}
|
|
}
|
|
omp.terminator
|
|
}
|
|
omp.terminator
|
|
}
|
|
return
|
|
}
|
|
|
|
|