Skip to content

Commit 28d632d

Browse files
committed
Revert "[flang][OpenMP] Enable delayed privatization by default omp.wsloop (#122471)"
This seems to have caused some regressions in Fujitsu's test-suite: https://linaro.atlassian.net/browse/LLVM-1521 This reverts commit 6f82408.
1 parent 0a9c08c commit 28d632d

File tree

74 files changed

+556
-439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+556
-439
lines changed

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2513,7 +2513,7 @@ static void genStandaloneDo(lower::AbstractConverter &converter,
25132513

25142514
DataSharingProcessor dsp(converter, semaCtx, item->clauses, eval,
25152515
/*shouldCollectPreDeterminedSymbols=*/true,
2516-
enableDelayedPrivatization, symTable);
2516+
enableDelayedPrivatizationStaging, symTable);
25172517
dsp.processStep1(&wsloopClauseOps);
25182518

25192519
mlir::omp::LoopNestOperands loopNestClauseOps;

flang/test/Lower/OpenMP/DelayedPrivatization/wsloop.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
! RUN: %flang_fc1 -emit-hlfir -fopenmp \
1+
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization-staging \
22
! RUN: -o - %s 2>&1 | FileCheck %s
3-
! RUN: bbc -emit-hlfir -fopenmp -o - %s 2>&1 \
3+
! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization-staging -o - %s 2>&1 \
44
! RUN: | FileCheck %s
55

66
subroutine wsloop_private

flang/test/Lower/OpenMP/Todo/omp-default-clause-inner-loop.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
! The string "EXPECTED" denotes the expected FIR
1010

1111
! CHECK: omp.parallel private(@{{.*}} %{{.*}} -> %[[PRIVATE_Y:.*]], @{{.*}} %{{.*}} -> %[[PRIVATE_Y:.*]] : !fir.ref<i32>, !fir.ref<i32>) {
12+
! CHECK: %[[TEMP:.*]] = fir.alloca i32 {bindc_name = "x", pinned, {{.*}}}
1213
! CHECK: %[[const_1:.*]] = arith.constant 1 : i32
1314
! CHECK: %[[const_2:.*]] = arith.constant 10 : i32
1415
! CHECK: %[[const_3:.*]] = arith.constant 1 : i32
15-
! CHECK: omp.wsloop private(@{{.*}} %{{.*}} -> %[[TEMP:.*]] : !fir.ref<i32>) {
16+
! CHECK: omp.wsloop {
1617
! CHECK-NEXT: omp.loop_nest (%[[ARG:.*]]) : i32 = (%[[const_1]]) to (%[[const_2]]) inclusive step (%[[const_3]]) {
1718
! CHECK: fir.store %[[ARG]] to %[[TEMP]] : !fir.ref<i32>
1819
! EXPECTED: %[[temp_1:.*]] = fir.load %[[PRIVATE_Z]] : !fir.ref<i32>

flang/test/Lower/OpenMP/associate.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
!CHECK: omp.parallel {
77
!CHECK-NOT: hlfir.declare {{.*}} {uniq_name = "_QFtest_parallel_assocEa"}
88
!CHECK-NOT: hlfir.declare {{.*}} {uniq_name = "_QFtest_parallel_assocEb"}
9-
!CHECK: omp.wsloop private({{.*}}) {
9+
!CHECK: omp.wsloop {
1010
!CHECK: }
1111
!CHECK: }
1212
!CHECK: omp.parallel {{.*}} {
1313
!CHECK-NOT: hlfir.declare {{.*}} {uniq_name = "_QFtest_parallel_assocEb"}
14-
!CHECK: omp.wsloop private({{.*}}) {
14+
!CHECK: omp.wsloop {
1515
!CHECK: }
1616
!CHECK: }
1717
subroutine test_parallel_assoc()

flang/test/Lower/OpenMP/copyin.f90

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,14 @@ subroutine copyin_derived_type()
154154

155155
! CHECK: omp.barrier
156156

157+
! CHECK: %[[VAL_6:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}}
158+
! CHECK: %[[VAL_7:.*]]:2 = hlfir.declare %[[VAL_6]] {uniq_name = "_QFcombined_parallel_worksharing_loopEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
157159

158160
! CHECK: %[[VAL_11:.*]] = arith.constant 1 : i32
159161
! CHECK: %[[VAL_12:.*]] = fir.load %[[VAL_9]]#0 : !fir.ref<i32>
160162
! CHECK: %[[VAL_13:.*]] = arith.constant 1 : i32
161-
! CHECK: omp.wsloop private(@{{.*}} %{{.*}} -> %[[VAL_6:.*]] : !fir.ref<i32>) {
163+
! CHECK: omp.wsloop {
162164
! CHECK-NEXT: omp.loop_nest (%[[VAL_14:.*]]) : i32 = (%[[VAL_11]]) to (%[[VAL_12]]) inclusive step (%[[VAL_13]]) {
163-
! CHECK: %[[VAL_7:.*]]:2 = hlfir.declare %[[VAL_6]] {uniq_name = "_QFcombined_parallel_worksharing_loopEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
164165
! CHECK: fir.store %[[VAL_14]] to %[[VAL_7]]#1 : !fir.ref<i32>
165166
! CHECK: fir.call @_QPsub4(%[[VAL_9]]#1) fastmath<contract> : (!fir.ref<i32>) -> ()
166167
! CHECK: omp.yield
@@ -320,12 +321,15 @@ subroutine common_1()
320321
! CHECK: %[[VAL_33:.*]] = fir.load %[[VAL_18]]#0 : !fir.ref<i32>
321322
! CHECK: hlfir.assign %[[VAL_33]] to %[[VAL_31]]#0 : i32, !fir.ref<i32>
322323
! CHECK: omp.barrier
324+
325+
! CHECK: %[[VAL_19:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}}
326+
! CHECK: %[[VAL_20:.*]]:2 = hlfir.declare %[[VAL_19]] {uniq_name = "_QFcommon_2Ei"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
327+
323328
! CHECK: %[[VAL_34:.*]] = arith.constant 1 : i32
324329
! CHECK: %[[VAL_35:.*]] = fir.load %[[VAL_26]]#0 : !fir.ref<i32>
325330
! CHECK: %[[VAL_36:.*]] = arith.constant 1 : i32
326-
! CHECK: omp.wsloop private(@{{.*}} %{{.*}} -> %[[VAL_19:.*]] : !fir.ref<i32>) {
331+
! CHECK: omp.wsloop {
327332
! CHECK-NEXT: omp.loop_nest (%[[VAL_37:.*]]) : i32 = (%[[VAL_34]]) to (%[[VAL_35]]) inclusive step (%[[VAL_36]]) {
328-
! CHECK: %[[VAL_20:.*]]:2 = hlfir.declare %[[VAL_19]] {uniq_name = "_QFcommon_2Ei"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
329333
! CHECK: fir.store %[[VAL_37]] to %[[VAL_20]]#1 : !fir.ref<i32>
330334
! CHECK: %[[VAL_38:.*]] = fir.load %[[VAL_31]]#0 : !fir.ref<i32>
331335
! CHECK: %[[VAL_39:.*]] = fir.load %[[VAL_20]]#0 : !fir.ref<i32>

flang/test/Lower/OpenMP/critical.f90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ subroutine predetermined_privatization()
3838
!CHECK: omp.parallel
3939
!$omp parallel do
4040

41+
!CHECK: %[[PRIV_I_ALLOC:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}}
42+
!CHECK: %[[PRIV_I_DECL:.*]]:2 = hlfir.declare %[[PRIV_I_ALLOC]]
4143
do i = 2, 10
42-
!CHECK: omp.wsloop private(@{{.*}} %{{.*}} -> %[[PRIV_I_ALLOC:.*]] : !fir.ref<i32>)
44+
!CHECK: omp.wsloop
4345
!CHECK: omp.loop_nest (%[[IV:[^[:space:]]+]])
44-
!CHECK: %[[PRIV_I_DECL:.*]]:2 = hlfir.declare %[[PRIV_I_ALLOC]]
4546
!CHECK: fir.store %[[IV]] to %[[PRIV_I_DECL]]#1
4647
!CHECK: omp.critical
4748
!$omp critical

flang/test/Lower/OpenMP/default-clause-byref.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ subroutine skipped_default_clause_checks()
346346
type(it)::iii
347347

348348
!CHECK: omp.parallel {{.*}} {
349-
!CHECK: omp.wsloop private({{.*}}) reduction(byref @min_byref_i32 %[[VAL_Z_DECLARE]]#0 -> %[[PRV:.+]] : !fir.ref<i32>) {
349+
!CHECK: omp.wsloop reduction(byref @min_byref_i32 %[[VAL_Z_DECLARE]]#0 -> %[[PRV:.+]] : !fir.ref<i32>) {
350350
!CHECK-NEXT: omp.loop_nest (%[[ARG:.*]]) {{.*}} {
351351
!CHECK: omp.yield
352352
!CHECK: }

flang/test/Lower/OpenMP/default-clause.f90

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,16 @@ subroutine nested_default_clause_test4
284284
!CHECK-LABEL: func @_QPnested_default_clause_test5
285285
!CHECK: omp.parallel {
286286

287+
!CHECK: %[[X_ALLOCA:.*]] = fir.alloca i32 {bindc_name = "x", pinned, uniq_name = "_QFnested_default_clause_test5Ex"}
288+
!CHECK: %[[X_DECLARE:.*]]:2 = hlfir.declare %[[X_ALLOCA]] {{.*}}
289+
290+
!CHECK: %[[LOOP_VAR_ALLOCA:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}}
291+
!CHECK: %[[LOOP_VAR_DECLARE:.*]]:2 = hlfir.declare %[[LOOP_VAR_ALLOCA]] {{.*}}
292+
287293
!CHECK: %[[CONST_LB:.*]] = arith.constant 1 : i32
288294
!CHECK: %[[CONST_UB:.*]] = arith.constant 50 : i32
289295
!CHECK: %[[CONST_STEP:.*]] = arith.constant 1 : i32
290-
! CHECK: omp.wsloop private(@{{.*}} %{{.*}} -> %[[X_ALLOCA:.*]], @{{.*}} %{{.*}} -> %[[LOOP_VAR_ALLOCA:.*]] : !fir.ref<i32>, !fir.ref<i32>) {
291296
!CHECK: omp.loop_nest (%[[ARG:.*]]) : i32 = (%[[CONST_LB]]) to (%[[CONST_UB]]) inclusive step (%[[CONST_STEP]]) {
292-
!CHECK: %[[X_DECLARE:.*]]:2 = hlfir.declare %[[X_ALLOCA]] {{.*}}
293-
!CHECK: %[[LOOP_VAR_DECLARE:.*]]:2 = hlfir.declare %[[LOOP_VAR_ALLOCA]] {{.*}}
294297
!CHECK: fir.store %[[ARG]] to %[[LOOP_VAR_DECLARE]]#1 : !fir.ref<i32>
295298
!CHECK: %[[LOADED_X:.*]] = fir.load %[[X_DECLARE]]#0 : !fir.ref<i32>
296299
!CHECK: %[[CONST:.*]] = arith.constant 1 : i32
@@ -318,12 +321,13 @@ subroutine nested_default_clause_test5
318321

319322
!CHECK: %[[Z_VAR_DECLARE:.*]]:2 = hlfir.declare %[[Z_VAR]] {{.*}}
320323

324+
!CHECK: %[[LOOP_VAR:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}}
325+
!CHECK: %[[LOOP_VAR_DECLARE:.*]]:2 = hlfir.declare %[[LOOP_VAR]] {{.*}}
326+
321327
!CHECK: %[[CONST_LB:.*]] = arith.constant 1 : i32
322328
!CHECK: %[[CONST_UB:.*]] = arith.constant 10 : i32
323329
!CHECK: %[[CONST_STEP:.*]] = arith.constant 1 : i32
324-
! CHECK: omp.wsloop private(@{{.*}} %{{.*}} -> %[[LOOP_VAR:.*]] : !fir.ref<i32>) {
325330
!CHECK: omp.loop_nest (%[[ARG:.*]]) : i32 = (%[[CONST_LB]]) to (%[[CONST_UB]]) inclusive step (%[[CONST_STEP]]) {
326-
!CHECK: %[[LOOP_VAR_DECLARE:.*]]:2 = hlfir.declare %[[LOOP_VAR]] {{.*}}
327331
!CHECK: fir.store %[[ARG]] to %[[LOOP_VAR_DECLARE]]#1 : !fir.ref<i32>
328332
!CHECK: %[[LOADED_X:.*]] = fir.load %[[X_VAR_DECLARE]]#0 : !fir.ref<i32>
329333
!CHECK: %[[CONST:.*]] = arith.constant 1 : i32
@@ -382,7 +386,7 @@ subroutine skipped_default_clause_checks()
382386
type(it)::iii
383387

384388
!CHECK: omp.parallel {{.*}} {
385-
!CHECK: omp.wsloop private({{.*}}) reduction(@min_i32 %[[VAL_Z_DECLARE]]#0 -> %[[PRV:.+]] : !fir.ref<i32>) {
389+
!CHECK: omp.wsloop reduction(@min_i32 %[[VAL_Z_DECLARE]]#0 -> %[[PRV:.+]] : !fir.ref<i32>) {
386390
!CHECK-NEXT: omp.loop_nest (%[[ARG:.*]]) {{.*}} {
387391
!CHECK: omp.yield
388392
!CHECK: }

flang/test/Lower/OpenMP/hlfir-wsloop.f90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ subroutine simple_loop
1010
! CHECK-DAG: %[[WS_END:.*]] = arith.constant 9 : i32
1111
! CHECK: omp.parallel
1212
!$OMP PARALLEL
13-
! CHECK: omp.wsloop private(@{{.*}} %{{.*}} -> %[[ALLOCA_IV:.*]] : !fir.ref<i32>) {
13+
! CHECK-DAG: %[[ALLOCA_IV:.*]] = fir.alloca i32 {{{.*}}, pinned, {{.*}}}
14+
! CHECK: %[[IV:.*]] = fir.declare %[[ALLOCA_IV]] {uniq_name = "_QFsimple_loopEi"} : (!fir.ref<i32>) -> !fir.ref<i32>
15+
! CHECK: omp.wsloop {
1416
! CHECK-NEXT: omp.loop_nest (%[[I:.*]]) : i32 = (%[[WS_ST]]) to (%[[WS_END]]) inclusive step (%[[WS_ST]]) {
1517
!$OMP DO
1618
do i=1, 9
17-
! CHECK: %[[IV:.*]] = fir.declare %[[ALLOCA_IV]] {uniq_name = "_QFsimple_loopEi"} : (!fir.ref<i32>) -> !fir.ref<i32>
1819
! CHECK: fir.store %[[I]] to %[[IV:.*]] : !fir.ref<i32>
1920
! CHECK: %[[LOAD_IV:.*]] = fir.load %[[IV]] : !fir.ref<i32>
2021
! CHECK: fir.call @_FortranAioOutputInteger32({{.*}}, %[[LOAD_IV]]) {{.*}}: (!fir.ref<i8>, i32) -> i1

flang/test/Lower/OpenMP/lastprivate-allocatable.f90

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
! CHECK: fir.store %[[VAL_2]] to %[[VAL_0]] : !fir.ref<!fir.box<!fir.heap<i32>>>
99
! CHECK: %[[VAL_3:.*]]:2 = hlfir.declare %[[VAL_0]] {fortran_attrs = {{.*}}<allocatable>, uniq_name = "_QFEa"} : (!fir.ref<!fir.box<!fir.heap<i32>>>) -> (!fir.ref<!fir.box<!fir.heap<i32>>>, !fir.ref<!fir.box<!fir.heap<i32>>>)
1010
! CHECK: omp.parallel {
11-
! CHECK: omp.wsloop private(@{{.*}} %{{.*}} -> %{{.*}}, @{{.*}} %{{.*}} -> %[[VAL_17:.*]] : !fir.ref<!fir.box<!fir.heap<i32>>>, !fir.ref<i32>) {
11+
! create original copy of private variable
12+
! CHECK: %[[VAL_16:.*]]:2 = hlfir.declare %{{.*}} {fortran_attrs = {{.*}}<allocatable>, uniq_name = "_QFEa"} : (!fir.ref<!fir.box<!fir.heap<i32>>>) -> (!fir.ref<!fir.box<!fir.heap<i32>>>, !fir.ref<!fir.box<!fir.heap<i32>>>)
13+
! CHECK: %[[VAL_17:.*]] = fir.alloca i32 {bindc_name = "i", pinned, uniq_name = "_QFEi"}
14+
! CHECK: %[[VAL_18:.*]]:2 = hlfir.declare %[[VAL_17]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
15+
! CHECK: omp.wsloop {
1216
! CHECK: omp.loop_nest
13-
! CHECK: %[[VAL_16:.*]]:2 = hlfir.declare %{{.*}} {fortran_attrs = {{.*}}<allocatable>, uniq_name = "_QFEa"} : (!fir.ref<!fir.box<!fir.heap<i32>>>) -> (!fir.ref<!fir.box<!fir.heap<i32>>>, !fir.ref<!fir.box<!fir.heap<i32>>>)
14-
! CHECK: %[[VAL_18:.*]]:2 = hlfir.declare %[[VAL_17]] {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
15-
1617
! [...]
1718
! if this is the last iteration
1819
! CHECK: fir.if %{{.*}} {

flang/test/Lower/OpenMP/lastprivate-commonblock.f90

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
!CHECK: %[[CB_C_Y_COOR:.*]] = fir.coordinate_of %[[CB_C_REF_CVT]], %{{.*}} : (!fir.ref<!fir.array<?xi8>>, index) -> !fir.ref<i8>
1212
!CHECK: %[[CB_C_Y_ADDR:.*]] = fir.convert %[[CB_C_Y_COOR]] : (!fir.ref<i8>) -> !fir.ref<f32>
1313
!CHECK: %[[Y_DECL:.*]]:2 = hlfir.declare %[[CB_C_Y_ADDR]] {uniq_name = "_QFlastprivate_commonEy"} : (!fir.ref<f32>) -> (!fir.ref<f32>, !fir.ref<f32>)
14-
!CHECK: omp.wsloop private(@{{.*}} %{{.*}} -> %[[PRIVATE_X_REF:.*]], @{{.*}} %{{.*}} -> %[[PRIVATE_Y_REF:.*]], @{{.*}} %{{.*}} -> %{{.*}} : !{{.*}}, !{{.*}}, !{{.*}}) {
15-
!CHECK-NEXT: omp.loop_nest (%[[I:.*]]) : i32 = (%{{.*}}) to (%{{.*}}) inclusive step (%{{.*}}) {
14+
!CHECK: %[[PRIVATE_X_REF:.*]] = fir.alloca f32 {bindc_name = "x", pinned, uniq_name = "_QFlastprivate_commonEx"}
1615
!CHECK: %[[PRIVATE_X_DECL:.*]]:2 = hlfir.declare %[[PRIVATE_X_REF]] {uniq_name = "_QFlastprivate_commonEx"} : (!fir.ref<f32>) -> (!fir.ref<f32>, !fir.ref<f32>)
16+
!CHECK: %[[PRIVATE_Y_REF:.*]] = fir.alloca f32 {bindc_name = "y", pinned, uniq_name = "_QFlastprivate_commonEy"}
1717
!CHECK: %[[PRIVATE_Y_DECL:.*]]:2 = hlfir.declare %[[PRIVATE_Y_REF]] {uniq_name = "_QFlastprivate_commonEy"} : (!fir.ref<f32>) -> (!fir.ref<f32>, !fir.ref<f32>)
18+
!CHECK: omp.wsloop {
19+
!CHECK-NEXT: omp.loop_nest (%[[I:.*]]) : i32 = (%{{.*}}) to (%{{.*}}) inclusive step (%{{.*}}) {
1820
!CHECK: %[[V:.*]] = arith.addi %[[I]], %{{.*}} : i32
1921
!CHECK: %[[C0:.*]] = arith.constant 0 : i32
2022
!CHECK: %[[NEG_STEP:.*]] = arith.cmpi slt, %{{.*}}, %[[C0]] : i32

flang/test/Lower/OpenMP/lastprivate-iv.f90

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
!CHECK: %[[I2_MEM:.*]] = fir.alloca i32 {bindc_name = "i", uniq_name = "_QFlastprivate_iv_incEi"}
77
!CHECK: %[[I2:.*]]:2 = hlfir.declare %[[I2_MEM]] {uniq_name = "_QFlastprivate_iv_incEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
88

9+
!CHECK: %[[I_MEM:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}}
10+
!CHECK: %[[I:.*]]:2 = hlfir.declare %[[I_MEM]] {uniq_name = "_QFlastprivate_iv_incEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
11+
912
!CHECK: %[[LB:.*]] = arith.constant 4 : i32
1013
!CHECK: %[[UB:.*]] = arith.constant 10 : i32
1114
!CHECK: %[[STEP:.*]] = arith.constant 3 : i32
12-
!CHECK: omp.wsloop private(@{{.*}} %{{.*}} -> %[[I_MEM:.*]] : !fir.ref<i32>) {
15+
!CHECK: omp.wsloop {
1316
!CHECK-NEXT: omp.loop_nest (%[[IV:.*]]) : i32 = (%[[LB]]) to (%[[UB]]) inclusive step (%[[STEP]]) {
14-
!CHECK: %[[I:.*]]:2 = hlfir.declare %[[I_MEM]] {uniq_name = "_QFlastprivate_iv_incEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
1517
!CHECK: fir.store %[[IV]] to %[[I]]#1 : !fir.ref<i32>
1618
!CHECK: %[[V:.*]] = arith.addi %[[IV]], %[[STEP]] : i32
1719
!CHECK: %[[C0:.*]] = arith.constant 0 : i32
@@ -40,12 +42,15 @@ subroutine lastprivate_iv_inc()
4042

4143
!CHECK: %[[I2_MEM:.*]] = fir.alloca i32 {bindc_name = "i", uniq_name = "_QFlastprivate_iv_decEi"}
4244
!CHECK: %[[I2:.*]]:2 = hlfir.declare %[[I2_MEM]] {uniq_name = "_QFlastprivate_iv_decEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
45+
46+
!CHECK: %[[I_MEM:.*]] = fir.alloca i32 {bindc_name = "i", pinned, {{.*}}}
47+
!CHECK: %[[I:.*]]:2 = hlfir.declare %[[I_MEM]] {uniq_name = "_QFlastprivate_iv_decEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
48+
4349
!CHECK: %[[LB:.*]] = arith.constant 10 : i32
4450
!CHECK: %[[UB:.*]] = arith.constant 1 : i32
4551
!CHECK: %[[STEP:.*]] = arith.constant -3 : i32
46-
!CHECK: omp.wsloop private(@{{.*}} %{{.*}} -> %[[I_MEM:.*]] : !fir.ref<i32>) {
52+
!CHECK: omp.wsloop {
4753
!CHECK-NEXT: omp.loop_nest (%[[IV:.*]]) : i32 = (%[[LB]]) to (%[[UB]]) inclusive step (%[[STEP]]) {
48-
!CHECK: %[[I:.*]]:2 = hlfir.declare %[[I_MEM]] {uniq_name = "_QFlastprivate_iv_decEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
4954
!CHECK: fir.store %[[IV]] to %[[I]]#1 : !fir.ref<i32>
5055
!CHECK: %[[V:.*]] = arith.addi %[[IV]], %[[STEP]] : i32
5156
!CHECK: %[[C0:.*]] = arith.constant 0 : i32
@@ -75,7 +80,7 @@ subroutine lastprivate_iv_dec()
7580
subroutine lastprivate_iv_i1
7681
integer*1 :: i1
7782
i1=0
78-
!CHECK: omp.wsloop private({{.*}})
83+
!CHECK: omp.wsloop
7984
!CHECK: omp.loop_nest
8085
!CHECK: fir.if %{{.*}} {
8186
!CHECK: %[[I8_VAL:.*]] = fir.convert %{{.*}} : (i32) -> i8

flang/test/Lower/OpenMP/location.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ subroutine sub_target()
2828

2929
!CHECK-LABEL: sub_loop
3030
subroutine sub_loop()
31-
!CHECK: omp.wsloop private({{.*}}) {
31+
!CHECK: omp.wsloop {
3232
!CHECK-NEXT: omp.loop_nest {{.*}} {
3333
!$omp do
3434
do i=1,10

flang/test/Lower/OpenMP/order-clause.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ end subroutine simd_order
2020

2121
!CHECK-LABEL: func.func @_QPdo_order() {
2222
subroutine do_order
23-
!CHECK: omp.wsloop order(reproducible:concurrent) private({{.*}}) {
23+
!CHECK: omp.wsloop order(reproducible:concurrent) {
2424
!$omp do order(concurrent)
2525
do i = 1, 10
2626
end do
27-
!CHECK: omp.wsloop order(reproducible:concurrent) private({{.*}}) {
27+
!CHECK: omp.wsloop order(reproducible:concurrent) {
2828
!$omp do order(reproducible:concurrent)
2929
do i = 1, 10
3030
end do
31-
!CHECK: omp.wsloop order(unconstrained:concurrent) private({{.*}}) {
31+
!CHECK: omp.wsloop order(unconstrained:concurrent) {
3232
!$omp do order(unconstrained:concurrent)
3333
do i = 1, 10
3434
end do

0 commit comments

Comments
 (0)