! RUN: %flang_fc1 -emit-hlfir -o - %s | FileCheck %s ! CHECK: #[[FIXED:.*]] = #llvm.loop_vectorize ! CHECK: #[[SCALABLE:.*]] = #llvm.loop_vectorize ! CHECK: #[[WIDTH2:.*]] = #llvm.loop_vectorize ! CHECK: #[[FIXED_WIDTH2:.*]] = #llvm.loop_vectorize ! CHECK: #[[SCALABLE_WIDTH2:.*]] = #llvm.loop_vectorize ! CHECK: #[[FIXED_TAG:.*]] = #llvm.loop_annotation ! CHECK: #[[SCALABLE_TAG:.*]] = #llvm.loop_annotation ! CHECK: #[[WIDTH2_TAG:.*]] = #llvm.loop_annotation ! CHECK: #[[FIXED_WIDTH2_TAG:.*]] = #llvm.loop_annotation ! CHECK: #[[SCALABLE_WIDTH2_TAG:.*]] = #llvm.loop_annotation ! CHECK-LABEL: func.func @_QPfixed( subroutine fixed(a, b, m) integer :: i, m, a(m), b(m) !dir$ vector vectorlength(fixed) ! CHECK: fir.do_loop {{.*}} attributes {loopAnnotation = #[[FIXED_TAG]]} do i = 1, m b(i) = a(i) + 1 end do end subroutine ! CHECK-LABEL: func.func @_QPscalable( subroutine scalable(a, b, m) integer :: i, m, a(m), b(m) !dir$ vector vectorlength(scalable) ! CHECK: fir.do_loop {{.*}} attributes {loopAnnotation = #[[SCALABLE_TAG]]} do i = 1, m b(i) = a(i) + 1 end do end subroutine ! CHECK-LABEL: func.func @_QPlen2( subroutine len2(a, b, m) integer :: i, m, a(m), b(m) !dir$ vector vectorlength(2) ! CHECK: fir.do_loop {{.*}} attributes {loopAnnotation = #[[WIDTH2_TAG]]} do i = 1, m b(i) = a(i) + 1 end do end subroutine ! CHECK-LABEL: func.func @_QPlen2fixed( subroutine len2fixed(a, b, m) integer :: i, m, a(m), b(m) !dir$ vector vectorlength(2,fixed) ! CHECK: fir.do_loop {{.*}} attributes {loopAnnotation = #[[FIXED_WIDTH2_TAG]]} do i = 1, m b(i) = a(i) + 1 end do end subroutine ! CHECK-LABEL: func.func @_QPlen2scalable( subroutine len2scalable(a, b, m) integer :: i, m, a(m), b(m) !dir$ vector vectorlength(2,scalable) ! CHECK: fir.do_loop {{.*}} attributes {loopAnnotation = #[[SCALABLE_WIDTH2_TAG]]} do i = 1, m b(i) = a(i) + 1 end do end subroutine