CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
89 lines
2.0 KiB
Fortran
89 lines
2.0 KiB
Fortran
!RUN: bbc -emit-hlfir -fopenacc -fopenmp -o - %s | FileCheck %s
|
|
|
|
!https://github.com/llvm/llvm-project/issues/91526
|
|
|
|
!CHECK-LABEL: func.func @_QPsimple1
|
|
!CHECK: cf.cond_br %{{[0-9]+}}, ^bb[[THEN:[0-9]+]], ^bb[[ELSE:[0-9]+]]
|
|
!CHECK: ^bb[[THEN]]:
|
|
!CHECK: omp.parallel
|
|
!CHECK: cf.br ^bb[[ENDIF:[0-9]+]]
|
|
!CHECK: ^bb[[ELSE]]:
|
|
!CHECK: fir.call @_FortranAStopStatement
|
|
!CHECK: fir.unreachable
|
|
!CHECK: ^bb[[ENDIF]]:
|
|
!CHECK: return
|
|
|
|
subroutine simple1(y)
|
|
implicit none
|
|
logical, intent(in) :: y
|
|
integer :: i
|
|
if (y) then
|
|
!$omp parallel
|
|
i = 1
|
|
!$omp end parallel
|
|
else
|
|
stop 1
|
|
end if
|
|
end subroutine
|
|
|
|
!CHECK-LABEL: func.func @_QPsimple2
|
|
!CHECK: cf.cond_br %{{[0-9]+}}, ^bb[[THEN:[0-9]+]], ^bb[[ELSE:[0-9]+]]
|
|
!CHECK: ^bb[[THEN]]:
|
|
!CHECK: omp.parallel
|
|
!CHECK: cf.br ^bb[[ENDIF:[0-9]+]]
|
|
!CHECK: ^bb[[ELSE]]:
|
|
!CHECK: fir.call @_FortranAStopStatement
|
|
!CHECK: fir.unreachable
|
|
!CHECK: ^bb[[ENDIF]]:
|
|
!CHECK: fir.call @_FortranAioOutputReal64
|
|
!CHECK: return
|
|
subroutine simple2(x, yn)
|
|
implicit none
|
|
logical, intent(in) :: yn
|
|
integer, intent(in) :: x
|
|
integer :: i
|
|
real(8) :: E
|
|
E = 0d0
|
|
|
|
if (yn) then
|
|
!$omp parallel do private(i) reduction(+:E)
|
|
do i = 1, x
|
|
E = E + i
|
|
end do
|
|
!$omp end parallel do
|
|
else
|
|
stop 1
|
|
end if
|
|
print *, E
|
|
end subroutine
|
|
|
|
!CHECK-LABEL: func.func @_QPacccase
|
|
!CHECK: fir.select_case %{{[0-9]+}} : i32 [{{.*}}, ^bb[[CASE1:[0-9]+]], {{.*}}, ^bb[[CASE2:[0-9]+]], {{.*}}, ^bb[[CASE3:[0-9]+]]]
|
|
!CHECK: ^bb[[CASE1]]:
|
|
!CHECK: acc.serial
|
|
!CHECK: cf.br ^bb[[EXIT:[0-9]+]]
|
|
!CHECK: ^bb[[CASE2]]:
|
|
!CHECK: fir.call @_FortranAioOutputAscii
|
|
!CHECK: cf.br ^bb[[EXIT]]
|
|
!CHECK: ^bb[[CASE3]]:
|
|
!CHECK: fir.call @_FortranAioOutputAscii
|
|
!CHECK: cf.br ^bb[[EXIT]]
|
|
!CHECK: ^bb[[EXIT]]:
|
|
!CHECK: return
|
|
subroutine acccase(var)
|
|
integer :: var
|
|
integer :: res(10)
|
|
select case (var)
|
|
case (1)
|
|
print *, "case 1"
|
|
!$acc serial
|
|
res(1) = 1
|
|
!$acc end serial
|
|
case (2)
|
|
print *, "case 2"
|
|
case default
|
|
print *, "case default"
|
|
end select
|
|
end subroutine
|
|
|