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
60 lines
1.9 KiB
Fortran
60 lines
1.9 KiB
Fortran
!RUN: %flang_fc1 -emit-hlfir %openmp_flags -fopenmp-version=50 %s -o - 2>&1 | FileCheck %s
|
|
!RUN: %flang_fc1 -emit-hlfir %openmp_flags -fopenmp-version=51 %s -o - 2>&1 | FileCheck %s --check-prefix=CHECK51
|
|
|
|
! Test that incompatible memory orderings on atomic operations are
|
|
! transformed to valid orderings during lowering.
|
|
|
|
! read + release -> relaxed
|
|
!CHECK: omp.atomic.read %{{.*}} = %{{.*}} memory_order(relaxed)
|
|
!CHECK51: omp.atomic.read %{{.*}} = %{{.*}} memory_order(relaxed)
|
|
subroutine test_read_release(x, v)
|
|
integer :: x, v
|
|
!$omp atomic read release
|
|
v = x
|
|
end
|
|
|
|
! read + acq_rel -> acquire (5.0 only; untouched in 5.1)
|
|
!CHECK: omp.atomic.read %{{.*}} = %{{.*}} memory_order(acquire)
|
|
!CHECK51: omp.atomic.read %{{.*}} = %{{.*}} memory_order(acq_rel)
|
|
subroutine test_read_acq_rel(x, v)
|
|
integer :: x, v
|
|
!$omp atomic read acq_rel
|
|
v = x
|
|
end
|
|
|
|
! write + acquire -> relaxed
|
|
!CHECK: omp.atomic.write %{{.*}} = %{{.*}} memory_order(relaxed)
|
|
!CHECK51: omp.atomic.write %{{.*}} = %{{.*}} memory_order(relaxed)
|
|
subroutine test_write_acquire(x, v)
|
|
integer :: x, v
|
|
!$omp atomic write acquire
|
|
x = v
|
|
end
|
|
|
|
! write + acq_rel -> release (5.0 only; untouched in 5.1)
|
|
!CHECK: omp.atomic.write %{{.*}} = %{{.*}} memory_order(release)
|
|
!CHECK51: omp.atomic.write %{{.*}} = %{{.*}} memory_order(acq_rel)
|
|
subroutine test_write_acq_rel(x, v)
|
|
integer :: x, v
|
|
!$omp atomic write acq_rel
|
|
x = v
|
|
end
|
|
|
|
! update + acquire -> relaxed (5.0 only; untouched in 5.1)
|
|
!CHECK: omp.atomic.update memory_order(relaxed)
|
|
!CHECK51: omp.atomic.update memory_order(acquire)
|
|
subroutine test_update_acquire(x)
|
|
integer :: x
|
|
!$omp atomic update acquire
|
|
x = x + 1
|
|
end
|
|
|
|
! update + acq_rel -> release (5.0 only; untouched in 5.1)
|
|
!CHECK: omp.atomic.update memory_order(release)
|
|
!CHECK51: omp.atomic.update memory_order(acq_rel)
|
|
subroutine test_update_acq_rel(x)
|
|
integer :: x
|
|
!$omp atomic update acq_rel
|
|
x = x + 1
|
|
end
|