[flang-commits] [flang] [flang][OpenMP] Add `private` to `allocate` in parallel-sections.f90 (PR #92185)
via flang-commits
flang-commits at lists.llvm.org
Tue May 14 14:49:13 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-openmp
@llvm/pr-subscribers-flang-fir-hlfir
Author: Krzysztof Parzyszek (kparzysz)
<details>
<summary>Changes</summary>
Add a privatizing clause to the construct that uses `allocate` clause. Amend the CHECK lines to reflect the expected output.
---
Full diff: https://github.com/llvm/llvm-project/pull/92185.diff
1 Files Affected:
- (modified) flang/test/Lower/OpenMP/parallel-sections.f90 (+2-6)
``````````diff
diff --git a/flang/test/Lower/OpenMP/parallel-sections.f90 b/flang/test/Lower/OpenMP/parallel-sections.f90
index 2f78dd4562b0a..ff96bdc29d425 100644
--- a/flang/test/Lower/OpenMP/parallel-sections.f90
+++ b/flang/test/Lower/OpenMP/parallel-sections.f90
@@ -40,12 +40,8 @@ subroutine omp_parallel_sections_allocate(x, y)
use omp_lib
integer, intent(inout) :: x, y
!CHECK: %[[allocator_1:.*]] = arith.constant 4 : i64
- !CHECK: %[[allocator_2:.*]] = arith.constant 4 : i64
- !CHECK: omp.parallel allocate(
- !CHECK: %[[allocator_2]] : i64 -> %{{.*}} : !fir.ref<i32>) {
- !CHECK: omp.sections allocate(
- !CHECK: %[[allocator_1]] : i64 -> %{{.*}} : !fir.ref<i32>) {
- !$omp parallel sections allocate(omp_high_bw_mem_alloc: x)
+ !CHECK: omp.sections allocate(%[[allocator_1]] : i64 -> %{{.*}} : !fir.ref<i32>) {
+ !$omp parallel sections allocate(omp_high_bw_mem_alloc: x) private(x, y)
!CHECK: omp.section {
!$omp section
x = x + 12
``````````
</details>
https://github.com/llvm/llvm-project/pull/92185
More information about the flang-commits
mailing list