Debian Codegraph @

flang/test/Lower/OpenMP/distribute-simd.f90

raw
1 ! This test checks lowering of OpenMP DISTRIBUTE SIMD composite constructs.
2
3 ! RUN: bbc -fopenmp -emit-hlfir %s -o - | FileCheck %s
4 ! RUN: %flang_fc1 -fopenmp -emit-hlfir %s -o - | FileCheck %s
5
6 ! CHECK-LABEL: func.func @_QPdistribute_simd_aligned(
7 subroutine distribute_simd_aligned(A)
8 use iso_c_binding
9 type(c_ptr) :: A
10
11 !$omp teams
12
13 ! CHECK: omp.distribute
14 ! CHECK-NOT: aligned({{.*}})
15 ! CHECK-SAME: {
16 ! CHECK-NEXT: omp.simd
17 ! CHECK-SAME: aligned({{.*}})
18 !$omp distribute simd aligned(A:256)
19 do index_ = 1, 10
20 call c_test_call(A)
21 end do
22 !$omp end distribute simd
23
24 !$omp end teams
25 end subroutine distribute_simd_aligned
26
27 ! CHECK-LABEL: func.func @_QPdistribute_simd_safelen(
28 subroutine distribute_simd_safelen()
29 !$omp teams
30
31 ! CHECK: omp.distribute
32 ! CHECK-NOT: safelen({{.*}})
33 ! CHECK-SAME: {
34 ! CHECK-NEXT: omp.simd
35 ! CHECK-SAME: safelen({{.*}})
36 !$omp distribute simd safelen(4)
37 do index_ = 1, 10
38 end do
39 !$omp end distribute simd
40
41 !$omp end teams
42 end subroutine distribute_simd_safelen
43
44 ! CHECK-LABEL: func.func @_QPdistribute_simd_simdlen(
45 subroutine distribute_simd_simdlen()
46 !$omp teams
47
48 ! CHECK: omp.distribute
49 ! CHECK-NOT: simdlen({{.*}})
50 ! CHECK-SAME: {
51 ! CHECK-NEXT: omp.simd
52 ! CHECK-SAME: simdlen({{.*}})
53 !$omp distribute simd simdlen(4)
54 do index_ = 1, 10
55 end do
56 !$omp end distribute simd
57
58 !$omp end teams
59 end subroutine distribute_simd_simdlen