[flang-commits] [flang] e6295c6 - [flang] Added tests for taskwait and taskyield translation
Shraiysh Vaishay via flang-commits
flang-commits at lists.llvm.org
Sun May 1 22:19:03 PDT 2022
Author: Shraiysh Vaishay
Date: 2022-05-02T10:48:03+05:30
New Revision: e6295c645f85b7f0ffc64183a24feea3c0574c3c
URL: https://github.com/llvm/llvm-project/commit/e6295c645f85b7f0ffc64183a24feea3c0574c3c
DIFF: https://github.com/llvm/llvm-project/commit/e6295c645f85b7f0ffc64183a24feea3c0574c3c.diff
LOG: [flang] Added tests for taskwait and taskyield translation
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D124229
Co-authored-by: Sourabh Singh Tomar <SourabhSingh.Tomar at amd.com>
Added:
flang/test/Lower/OpenMP/taskwait.f90
flang/test/Lower/OpenMP/taskyield.f90
Modified:
Removed:
################################################################################
diff --git a/flang/test/Lower/OpenMP/taskwait.f90 b/flang/test/Lower/OpenMP/taskwait.f90
new file mode 100644
index 0000000000000..30e6422d3381b
--- /dev/null
+++ b/flang/test/Lower/OpenMP/taskwait.f90
@@ -0,0 +1,12 @@
+!RUN: %flang_fc1 -emit-fir -fopenmp %s -o - | FileCheck %s --check-prefixes="FIRDialect,OMPDialect"
+!RUN: %flang_fc1 -emit-fir -fopenmp %s -o - | fir-opt --fir-to-llvm-ir | FileCheck %s --check-prefixes="OMPDialect"
+
+!FIRDialect-LABEL: @_QPomp_taskwait
+subroutine omp_taskwait
+ !OMPDialect: omp.taskwait
+ !$omp taskwait
+ !FIRDialect: fir.call @_QPfoo() : () -> ()
+ call foo()
+ !OMPDialect: omp.taskwait
+ !$omp taskwait
+end subroutine omp_taskwait
diff --git a/flang/test/Lower/OpenMP/taskyield.f90 b/flang/test/Lower/OpenMP/taskyield.f90
new file mode 100644
index 0000000000000..07d0c124e16ab
--- /dev/null
+++ b/flang/test/Lower/OpenMP/taskyield.f90
@@ -0,0 +1,12 @@
+!RUN: %flang_fc1 -emit-fir -fopenmp %s -o - | FileCheck %s --check-prefixes="FIRDialect,OMPDialect"
+!RUN: %flang_fc1 -emit-fir -fopenmp %s -o - | fir-opt --fir-to-llvm-ir | FileCheck %s --check-prefixes="OMPDialect"
+
+!FIRDialect-LABEL: @_QPomp_taskyield
+subroutine omp_taskyield
+ !OMPDialect: omp.taskyield
+ !$omp taskyield
+ !FIRDialect: fir.call @_QPfoo() : () -> ()
+ call foo()
+ !OMPDialect: omp.taskyield
+ !$omp taskyield
+end subroutine omp_taskyield
More information about the flang-commits
mailing list