Files
TheRock/compiler/amd-llvm/flang/test/Transforms/OpenMP/lower-workshare-copyprivate.mlir
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

74 lines
2.0 KiB
MLIR

// RUN: fir-opt --split-input-file --lower-workshare --allow-unregistered-dialect %s | FileCheck %s
// Check if we store the correct values
func.func @wsfunc() {
omp.parallel {
// CHECK: fir.alloca
// CHECK: fir.alloca
// CHECK: fir.alloca
// CHECK: fir.alloca
// CHECK: fir.alloca
// CHECK-NOT: fir.alloca
omp.workshare {
%t1 = "test.test1"() : () -> i32
// CHECK: %[[T1:.*]] = "test.test1"
// CHECK: fir.store %[[T1]]
%t2 = "test.test2"() : () -> i32
// CHECK: %[[T2:.*]] = "test.test2"
// CHECK: fir.store %[[T2]]
%t3 = "test.test3"() : () -> i32
// CHECK: %[[T3:.*]] = "test.test3"
// CHECK-NOT: fir.store %[[T3]]
%t4 = "test.test4"() : () -> i32
// CHECK: %[[T4:.*]] = "test.test4"
// CHECK: fir.store %[[T4]]
%t5 = "test.test5"() : () -> i32
// CHECK: %[[T5:.*]] = "test.test5"
// CHECK: fir.store %[[T5]]
%t6 = "test.test6"() : () -> i32
// CHECK: %[[T6:.*]] = "test.test6"
// CHECK-NOT: fir.store %[[T6]]
"test.test1"(%t1) : (i32) -> ()
"test.test1"(%t2) : (i32) -> ()
"test.test1"(%t3) : (i32) -> ()
%true = arith.constant true
fir.if %true {
"test.test2"(%t3) : (i32) -> ()
}
%c1_i32 = arith.constant 1 : i32
%t5_pure_use = arith.addi %t5, %c1_i32 : i32
%t6_mem_effect_use = "test.test8"(%t6) : (i32) -> i32
// CHECK: %[[T6_USE:.*]] = "test.test8"
// CHECK: fir.store %[[T6_USE]]
%c42 = arith.constant 42 : index
%c1 = arith.constant 1 : index
omp.workshare.loop_wrapper {
omp.loop_nest (%arg1) : index = (%c1) to (%c42) inclusive step (%c1) {
"test.test10"(%t1) : (i32) -> ()
"test.test10"(%t5_pure_use) : (i32) -> ()
"test.test10"(%t6_mem_effect_use) : (i32) -> ()
omp.yield
}
}
"test.test10"(%t2) : (i32) -> ()
fir.if %true {
"test.test10"(%t4) : (i32) -> ()
}
omp.terminator
}
omp.terminator
}
return
}