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

via flang-commits flang-commits at lists.llvm.org
Wed Mar 5 02:31:23 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-openmp

Author: Kiran Kumar T P (kiranktp)

<details>
<summary>Changes</summary>

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"

---
Full diff: https://github.com/llvm/llvm-project/pull/129862.diff


1 Files Affected:

- (added) flang/test/Lower/OpenMP/Todo/taskloop-cancel.f90 (+14) 


``````````diff
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

``````````

</details>


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


More information about the flang-commits mailing list