diff options
Diffstat (limited to 'flang/test/Parser/compiler-directives.f90')
| -rw-r--r-- | flang/test/Parser/compiler-directives.f90 | 57 |
1 files changed, 55 insertions, 2 deletions
diff --git a/flang/test/Parser/compiler-directives.f90 b/flang/test/Parser/compiler-directives.f90 index 04d22ff..77c6b45 100644 --- a/flang/test/Parser/compiler-directives.f90 +++ b/flang/test/Parser/compiler-directives.f90 @@ -36,6 +36,28 @@ subroutine vector_always enddo end subroutine +subroutine vector_vectorlength + !dir$ vector vectorlength(fixed) + ! CHECK: !DIR$ VECTOR VECTORLENGTH (FIXED) + do i=1,10 + enddo + + !dir$ vector vectorlength(scalable) + ! CHECK: !DIR$ VECTOR VECTORLENGTH (SCALABLE) + do i=1,10 + enddo + + !dir$ vector vectorlength(8,scalable) + ! CHECK: !DIR$ VECTOR VECTORLENGTH (8, SCALABLE) + do i=1,10 + enddo + + !dir$ vector vectorlength(4) + ! CHECK: !DIR$ VECTOR VECTORLENGTH (4) + do i=1,10 + enddo +end subroutine + subroutine unroll !dir$ unroll ! CHECK: !DIR$ UNROLL @@ -46,7 +68,7 @@ subroutine unroll do i=1,10 enddo !dir$ nounroll - ! CHECK: !DIR$ NOUNROLL + ! CHECK: !DIR$ NOUNROLL do i=1,10 enddo end subroutine @@ -61,7 +83,7 @@ subroutine unroll_and_jam do i=1,10 enddo !dir$ nounroll_and_jam - ! CHECK: !DIR$ NOUNROLL_AND_JAM + ! CHECK: !DIR$ NOUNROLL_AND_JAM do i=1,10 enddo end subroutine @@ -72,3 +94,34 @@ subroutine no_vector do i=1,10 enddo end subroutine + +subroutine inline + integer :: a + !dir$ forceinline + ! CHECK: !DIR$ FORCEINLINE + a = f(2) + + !dir$ inline + ! CHECK: !DIR$ INLINE + call g() + + !dir$ noinline + ! CHECK: !DIR$ NOINLINE + call g() + + contains + function f(x) + integer :: x + f = x**2 + end function + + subroutine g() + end subroutine +end subroutine + +subroutine ivdep + !dir$ ivdep + ! CHECK: !DIR$ IVDEP + do i=1,10 + enddo +end subroutine |
