Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions flang/test/Semantics/OpenMP/loop-transformation-construct01.f90
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ subroutine loop_transformation_construct1
subroutine loop_transformation_construct2
implicit none
integer :: i = 5
integer :: y
integer :: x
integer :: v(i)

!$omp do
!$omp tile
do x = 1, i
v(x) = x(x) * 2
v(x) = v(x) * 2
end do
!$omp end tile
!$omp end do
Expand All @@ -30,26 +30,26 @@ subroutine loop_transformation_construct2
subroutine loop_transformation_construct2
implicit none
integer :: i = 5
integer :: y
integer :: x
integer :: v(i)

!$omp do
!ERROR: Only Loop Transformation Constructs or Loop Nests can be nested within Loop Constructs
!$omp parallel do
do x = 1, i
v(x) = x(x) * 2
v(x) = v(x) * 2
end do
end subroutine

subroutine loop_transformation_construct3
implicit none
integer :: i = 5
integer :: y
integer :: x
integer :: v(i)

!$omp do
do x = 1, i
v(x) = x(x) * 2
v(x) = v(x) * 2
end do
!ERROR: A DO loop must follow the TILE directive
!$omp tile
Expand All @@ -58,43 +58,43 @@ subroutine loop_transformation_construct3
subroutine loop_transformation_construct4
implicit none
integer :: i = 5
integer :: y
integer :: x
integer :: v(i)

!$omp do
!ERROR: If a loop construct has been fully unrolled, it cannot then be tiled
!$omp tile
!$omp unroll full
do x = 1, i
v(x) = x(x) * 2
v(x) = v(x) * 2
end do
end subroutine

subroutine loop_transformation_construct5
implicit none
integer :: i = 5
integer :: y
integer :: x
integer :: v(i)

!$omp do
!ERROR: If a loop construct has been fully unrolled, it cannot then be tiled
!$omp tile
!$omp unroll
do x = 1, i
v(x) = x(x) * 2
v(x) = v(x) * 2
end do
end subroutine

subroutine loop_transformation_construct6
implicit none
integer :: i = 5
integer :: y
integer :: x
integer :: v(i)

!$omp do
!$omp tile
!$omp unroll partial(2)
do x = 1, i
v(x) = x(x) * 2
v(x) = v(x) * 2
end do
end subroutine