mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 22:06:36 +00:00

This patch update the PFTBuilder to be able to lower the construct present in semantics. This is a building block for other lowering patches that will be posted soon. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld, schweitz Differential Revision: https://reviews.llvm.org/D120336 Co-authored-by: Jean Perier <jperier@nvidia.com> Co-authored-by: V Donaldson <vdonaldson@nvidia.com>
51 lines
1.3 KiB
Fortran
51 lines
1.3 KiB
Fortran
! RUN: %flang_fc1 -fdebug-pre-fir-tree -fopenacc %s | FileCheck %s
|
|
|
|
! Test structure of the Pre-FIR tree with OpenACC construct
|
|
|
|
! CHECK: Subroutine foo
|
|
subroutine foo()
|
|
! CHECK-NEXT: <<OpenACCConstruct>>
|
|
! CHECK-NEXT: <<OpenACCConstruct>>
|
|
!$acc parallel
|
|
!$acc loop
|
|
! CHECK-NEXT: <<DoConstruct>>
|
|
! CHECK-NEXT: NonLabelDoStmt
|
|
do i=1,5
|
|
! CHECK-NEXT: PrintStmt
|
|
print *, "hey"
|
|
! CHECK-NEXT: <<DoConstruct>>
|
|
! CHECK-NEXT: NonLabelDoStmt
|
|
do j=1,5
|
|
! CHECK-NEXT: PrintStmt
|
|
print *, "hello", i, j
|
|
! CHECK-NEXT: EndDoStmt
|
|
! CHECK-NEXT: <<End DoConstruct>>
|
|
end do
|
|
! CHECK-NEXT: EndDoStmt
|
|
! CHECK-NEXT: <<End DoConstruct>>
|
|
end do
|
|
! CHECK-NEXT: ContinueStmt
|
|
!$acc end parallel
|
|
! CHECK-NEXT: <<End OpenACCConstruct>>
|
|
! CHECK-NEXT: <<End OpenACCConstruct>>
|
|
! CHECK-NEXT: EndSubroutineStmt
|
|
end subroutine
|
|
! CHECK-NEXT: End Subroutine foo
|
|
|
|
! CHECK: Subroutine foo2
|
|
subroutine foo2()
|
|
! CHECK-NEXT: <<OpenACCConstruct>>
|
|
!$acc parallel loop
|
|
! CHECK-NEXT: <<DoConstruct>>
|
|
! CHECK-NEXT: NonLabelDoStmt
|
|
do i=1,5
|
|
! CHECK-NEXT: EndDoStmt
|
|
! CHECK-NEXT: <<End DoConstruct>>
|
|
end do
|
|
! CHECK-NEXT: ContinueStmt
|
|
!$acc end parallel loop
|
|
! CHECK-NEXT: <<End OpenACCConstruct>>
|
|
! CHECK-NEXT: EndSubroutineStmt
|
|
end subroutine
|
|
! CHECK-NEXT: End Subroutine foo2
|