[flang-commits] [flang] [flang][OpenMP] Remove `allocate` from `taskgroup` in test (PR #92173)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Tue May 14 13:51:34 PDT 2024
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/92173
Remove the `allocate`, because it needs to be used together with a privatizing clause. The only such clause for `taskgroup` is `task_reduction`, but it's not yet supported.
>From b4fc1180932138ba1561ba19e4025fb236fa1ec6 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Tue, 14 May 2024 15:49:17 -0500
Subject: [PATCH] [flang][OpenMP] Remove `allocate` from `taskgroup` in test
Remove the `allocate`, because it needs to be used together with
a privatizing clause. The only such clause for `taskgroup` is
`task_reduction`, but it's not yet supported.
---
flang/test/Lower/OpenMP/taskgroup.f90 | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/flang/test/Lower/OpenMP/taskgroup.f90 b/flang/test/Lower/OpenMP/taskgroup.f90
index 76458f1f1127f..d9d262bdd2c08 100644
--- a/flang/test/Lower/OpenMP/taskgroup.f90
+++ b/flang/test/Lower/OpenMP/taskgroup.f90
@@ -1,17 +1,14 @@
-! REQUIRES: openmp_runtime
-
!RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
+! The "allocate" clause has been removed, because it needs to be used
+! together with a privatizing clause. The only such clause for "taskgroup"
+! is "task_reduction", but it's not yet supported.
+
!CHECK-LABEL: @_QPomp_taskgroup
subroutine omp_taskgroup
-use omp_lib
-integer :: allocated_x
-!CHECK: %[[ALLOC_X_REF:.*]] = fir.alloca i32 {bindc_name = "allocated_x", uniq_name = "_QFomp_taskgroupEallocated_x"}
-!CHECK-NEXT: %[[ALLOC_X_DECL:.*]]:2 = hlfir.declare %[[ALLOC_X_REF]] {uniq_name = "_QFomp_taskgroupEallocated_x"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
-!CHECK: %[[C4:.*]] = arith.constant 4 : i64
-
-!CHECK: omp.taskgroup allocate(%[[C4]] : i64 -> %[[ALLOC_X_DECL]]#1 : !fir.ref<i32>)
-!$omp taskgroup allocate(omp_high_bw_mem_alloc: allocated_x)
+!CHECK: omp.taskgroup
+!$omp taskgroup
+!CHECK: omp.task
!$omp task
!CHECK: fir.call @_QPwork() {{.*}}: () -> ()
call work()
More information about the flang-commits
mailing list