brintos

brintos / llvm-project-archived public Read only

0
0
Text · 762 B · 828bd89 Raw
21 lines · plain
1! RUN: %flang_fc1 -emit-hlfir -o - %s | FileCheck %s2 3subroutine dc_associate_reduce4  integer :: i5  real, allocatable, dimension(:) :: x6 7  associate(x_associate => x)8  do concurrent (i = 1:10) reduce(+: x_associate)9  end do10  end associate11end subroutine12 13! CHECK-LABEL: func.func @_QPdc_associate_reduce() {14! CHECK:         %[[BOX_ALLOC:.*]] = fir.alloca !fir.box<!fir.array<?xf32>>15! CHECK:         %[[ASSOC_DECL:.*]]:2 = hlfir.declare %{{.*}}(%{{.*}}) {uniq_name = "{{.*}}x_associate"}16! CHECK:         fir.store %[[ASSOC_DECL]]#0 to %[[BOX_ALLOC]]17! CHECK-NEXT:    fir.do_concurrent {18! CHECK:           fir.do_concurrent.loop {{.*}} reduce(byref @{{.*}} #fir.reduce_attr<add> %[[BOX_ALLOC]] -> %{{.*}} : !{{.*}}) {19! CHECK:         }20! CHECK:       }21