brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · eca8fb3 Raw
71 lines · plain
1! RUN: bbc -fopenmp -pft-test -o %t %s | FileCheck %s2! RUN: %flang_fc1 -fopenmp -fdebug-dump-pft -o %t %s | FileCheck %s3 4! Loop constructs always have an `end do` which can be the target of5! a branch. So OpenMP loop constructs do not need an artificial6! continue inserted for a target.7 8!CHECK-LABEL: sb09!CHECK-NOT: continue10subroutine sb0(cond)11  implicit none12  logical :: cond13  integer :: i14  !$omp parallel do15  do i = 1, 2016    if( cond) then17      cycle18    end if19  end do20  return21end subroutine22 23!CHECK-LABEL: sb124!CHECK-NOT: continue25subroutine sb1(cond)26  implicit none27  logical :: cond28  integer :: i29  !$omp parallel do30  do i = 1, 2031    if( cond) then32      cycle33    end if34  end do35  !$omp end parallel do36  return37end subroutine38 39!CHECK-LABEL: sb240!CHECK-NOT: continue41subroutine sb242  integer :: i, n43  integer :: tmp44 45  !$omp parallel do46  do ifld=1,n47     do isum=1,n48       if (tmp > n) then49         exit50       endif51     enddo52     tmp = n53  enddo54end subroutine55 56!CHECK-LABEL: sb357!CHECK-NOT: continue58subroutine sb359  integer :: i, n60  integer :: tmp61 62  !$omp parallel do63  do ifld=1,n64     do isum=1,n65       if (tmp > n) then66         exit67       endif68     enddo69  enddo70end subroutine71