Files
TheRock/compiler/amd-llvm/flang/test/Lower/OpenMP/location.f90
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

71 lines
1.8 KiB
Fortran

! This test checks location of OpenMP constructs and clauses
!RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --mlir-print-debuginfo %s -o - | FileCheck %s
!CHECK-LABEL: sub_parallel
subroutine sub_parallel()
print *, x
!CHECK: omp.parallel {
!$omp parallel
print *, x
!CHECK: omp.terminator loc(#[[PAR_LOC:.*]])
!CHECK: } loc(#[[PAR_LOC]])
!$omp end parallel
print *, x
end
!CHECK-LABEL: sub_target
subroutine sub_target()
print *, x
!CHECK: omp.target {{.*}} {
!$omp target
print *, x
!CHECK: omp.terminator loc(#[[TAR_LOC:.*]])
!CHECK: } loc(#[[TAR_LOC]])
!$omp end target
print *, x
end
!CHECK-LABEL: sub_loop
subroutine sub_loop()
!CHECK: omp.wsloop private({{.*}}) {
!CHECK-NEXT: omp.loop_nest {{.*}} {
!$omp do
do i=1,10
print *, i
!CHECK: omp.yield loc(#[[LOOP_LOC:.*]])
!CHECK: } loc(#[[LOOP_LOC]])
!CHECK: } loc(#[[LOOP_LOC]])
end do
!$omp end do
end
!CHECK-LABEL: sub_standalone
subroutine sub_standalone()
!CHECK: omp.barrier loc(#[[BAR_LOC:.*]])
!$omp barrier
!CHECK: omp.taskwait loc(#[[TW_LOC:.*]])
!$omp taskwait
!CHECK: omp.taskyield loc(#[[TY_LOC:.*]])
!$omp taskyield
end
subroutine sub_if(c)
logical(kind=4) :: c
!CHECK: %[[CVT:.*]] = fir.convert %{{.*}} : (!fir.logical<4>) -> i1 loc(#[[IF_LOC:.*]])
!CHECK: omp.task if(%[[CVT]])
!$omp task if(c)
print *, "Task"
!$omp end task
!CHECK: } loc(#[[TASK_LOC:.*]])
end subroutine
!CHECK: #[[PAR_LOC]] = loc("{{.*}}location.f90":9:9)
!CHECK: #[[TAR_LOC]] = loc("{{.*}}location.f90":21:9)
!CHECK: #[[LOOP_LOC]] = loc("{{.*}}location.f90":33:9)
!CHECK: #[[BAR_LOC]] = loc("{{.*}}location.f90":46:9)
!CHECK: #[[TW_LOC]] = loc("{{.*}}location.f90":48:9)
!CHECK: #[[TY_LOC]] = loc("{{.*}}location.f90":50:9)
!CHECK: #[[TASK_LOC]] = loc("{{.*}}location.f90":57:9)
!CHECK: #[[IF_LOC]] = loc("{{.*}}location.f90":57:14)