[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@amd.com>
This commit is contained in:
Shraiysh Vaishay 2022-05-02 10:41:46 +05:30
parent 3d6fe7ace8
commit e6295c645f
2 changed files with 24 additions and 0 deletions

View File

@ -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

View File

@ -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