[flang-commits] [flang] [flang][OpenMP] Add `private` to `allocate` in parallel-sections.f90 (PR #92185)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Tue May 14 14:48:46 PDT 2024
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/92185
Add a privatizing clause to the construct that uses `allocate` clause. Amend the CHECK lines to reflect the expected output.
>From 9ee3d53e0f37847dcb26a95a9e3d03158a9c674b Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Tue, 14 May 2024 16:46:47 -0500
Subject: [PATCH] [flang][OpenMP] Add `private` to `allocate` in
parallel-sections.f90
Add a privatizing clause to the construct that uses `allocate` clause.
Amend the CHECK lines to reflect the expected output.
---
flang/test/Lower/OpenMP/parallel-sections.f90 | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
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
More information about the flang-commits
mailing list