brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 75753de Raw
40 lines · plain
1! RUN: %flang_fc1 -emit-hlfir -o - %s | FileCheck %s2 3! CHECK: #loop_vectorize = #llvm.loop_vectorize<disable = false>4! CHECK: #loop_vectorize1 = #llvm.loop_vectorize<disable = true>5! CHECK: #loop_annotation = #llvm.loop_annotation<vectorize = #loop_vectorize>6! CHECK: #loop_annotation1 = #llvm.loop_annotation<vectorize = #loop_vectorize1>7 8! CHECK-LABEL: vector_always9subroutine vector_always10  integer :: a(10)11  !dir$ vector always12  !CHECK: fir.do_loop {{.*}} attributes {loopAnnotation = #loop_annotation}13  do i=1,1014     a(i)=i15  end do16end subroutine vector_always17 18 19! CHECK-LABEL: intermediate_directive20subroutine intermediate_directive21  integer :: a(10)22  !dir$ vector always23  !dir$ unknown24  !CHECK: fir.do_loop {{.*}} attributes {loopAnnotation = #loop_annotation}25  do i=1,1026     a(i)=i27  end do28end subroutine intermediate_directive29 30 31! CHECK-LABEL: no_vector32subroutine no_vector33  integer :: a(10)34  !dir$ novector35  !CHECK: fir.do_loop {{.*}} attributes {loopAnnotation = #loop_annotation1}36  do i=1,1037     a(i)=i38  end do39end subroutine no_vector40