[flang-commits] [flang] [LLVM-FLANG] [OpenMP] [Taskloop] - Add test case with cancel construct inside taskloop (PR #129862)

Kiran Kumar T P via flang-commits flang-commits at lists.llvm.org
Wed Mar 5 02:30:50 PST 2025


https://github.com/kiranktp created https://github.com/llvm/llvm-project/pull/129862

Added a test case with cancel construct inside taskloop. Currently taskloop lowering is not supported so below error is issued: "not yet implemented: Taskloop construct"
Once the lowering patch is merged, todo error should be issued for cancel construct. "not yet implemented: OpenMPCancelConstruct"

>From 7d42dbf94e96fc209d8ca5d819d0f3f598259c10 Mon Sep 17 00:00:00 2001
From: Kiran Kumar T P <kirankumar.tp at amd.com>
Date: Wed, 5 Mar 2025 15:58:30 +0530
Subject: [PATCH] [LLVM-FLANG] [OpenMP] [Taskloop] - Add test case with cancel
 construct inside taskloop

Added a test case with cancel construct inside taskloop.
Currently taskloop lowering is not supported so below error is issued:
"not yet implemented: Taskloop construct"
Once the lowering patch is merged, todo error should be issued for cancel construct.
"not yet implemented: OpenMPCancelConstruct"
---
 flang/test/Lower/OpenMP/Todo/taskloop-cancel.f90 | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 flang/test/Lower/OpenMP/Todo/taskloop-cancel.f90

diff --git a/flang/test/Lower/OpenMP/Todo/taskloop-cancel.f90 b/flang/test/Lower/OpenMP/Todo/taskloop-cancel.f90
new file mode 100644
index 0000000000000..5045c621e4d77
--- /dev/null
+++ b/flang/test/Lower/OpenMP/Todo/taskloop-cancel.f90
@@ -0,0 +1,14 @@
+! RUN: %not_todo_cmd bbc -emit-fir -fopenmp -o - %s -fopenmp-version=50 2>&1 | FileCheck %s
+! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -o - %s -fopenmp-version=50 2>&1 | FileCheck %s
+
+! CHECK: not yet implemented: Taskloop construct
+subroutine omp_taskloop
+integer :: i
+!$omp parallel
+    !$omp taskloop
+      do i = 1, 10
+      !$omp cancel taskgroup
+      end do
+    !$omp end taskloop
+!$omp end parallel
+end subroutine omp_taskloop



More information about the flang-commits mailing list