[AMDGPU] Test codegen'ing True16 additions.
[llvm-project.git] / flang / test / Lower / OpenMP / critical.f90
blob9fbd172df96421c8ab1e3d6cec8f5258d8ebd02c
1 !RUN: %flang_fc1 -emit-hlfir -fopenmp %s -o - | FileCheck %s
3 !CHECK: omp.critical.declare @help2 hint(none)
4 !CHECK: omp.critical.declare @help1 hint(contended)
6 subroutine omp_critical()
7 use omp_lib
8 integer :: x, y
9 !CHECK: omp.critical(@help1)
10 !$OMP CRITICAL(help1) HINT(omp_lock_hint_contended)
11 x = x + y
12 !CHECK: omp.terminator
13 !$OMP END CRITICAL(help1)
15 ! Test that the same name can be used again
16 ! Also test with the zero hint expression
17 !CHECK: omp.critical(@help2)
18 !$OMP CRITICAL(help2) HINT(omp_lock_hint_none)
19 x = x - y
20 !CHECK: omp.terminator
21 !$OMP END CRITICAL(help2)
23 !CHECK: omp.critical
24 !$OMP CRITICAL
25 y = x + y
26 !CHECK: omp.terminator
27 !$OMP END CRITICAL
28 end subroutine omp_critical