[flang-commits] [flang] 97a3044 - [flang][OpenMP] Add `private` to `allocate` in parallel-sections.f90 (#92185)

via flang-commits flang-commits at lists.llvm.org
Wed May 15 06:57:49 PDT 2024


Author: Krzysztof Parzyszek
Date: 2024-05-15T08:57:45-05:00
New Revision: 97a30448f9477e0196f9340303aa20d544f1629a

URL: https://github.com/llvm/llvm-project/commit/97a30448f9477e0196f9340303aa20d544f1629a
DIFF: https://github.com/llvm/llvm-project/commit/97a30448f9477e0196f9340303aa20d544f1629a.diff

LOG: [flang][OpenMP] Add `private` to `allocate` in parallel-sections.f90 (#92185)

Add a privatizing clause to the construct that uses `allocate` clause.
Amend the CHECK lines to reflect the expected output.

Added: 
    

Modified: 
    flang/test/Lower/OpenMP/parallel-sections.f90

Removed: 
    


################################################################################
diff  --git a/flang/test/Lower/OpenMP/parallel-sections.f90 b/flang/test/Lower/OpenMP/parallel-sections.f90
index 2f78dd4562b0a..285102e06cad1 100644
--- a/flang/test/Lower/OpenMP/parallel-sections.f90
+++ b/flang/test/Lower/OpenMP/parallel-sections.f90
@@ -39,13 +39,10 @@ end subroutine omp_parallel_sections
 subroutine omp_parallel_sections_allocate(x, y)
   use omp_lib
   integer, intent(inout) :: x, y
+  !CHECK: omp.parallel
   !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