Skip to content

Commit a6761d7

Browse files
committed
post-cherry-pick fixes
1 parent cda1425 commit a6761d7

13 files changed

+2
-24
lines changed

flang/lib/Lower/Support/PrivateReductionUtils.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -515,22 +515,11 @@ void PopulateInitAndCleanupRegionsHelper::initAndCleanupBoxedArray(
515515
if (shouldAllocateOnStack)
516516
return createStackTempFromMold(loc, builder, source);
517517

518-
mlir::Value tempValue;
519-
std::optional<int64_t> cstNeedsDealloc;
520-
if (isAllocatableOrPointer) {
521-
auto [heapTemp, needsDealloc] = createTempFromMold(loc, builder, source);
522-
tempValue = heapTemp;
523-
cstNeedsDealloc = fir::getIntIfConstant(needsDealloc);
524-
} else {
525-
tempValue = hlfir::createStackTempFromMold(loc, builder, source);
526-
cstNeedsDealloc = false;
527-
}
528-
hlfir::Entity temp{tempValue};
518+
auto [temp, needsDealloc] = createTempFromMold(loc, builder, source);
529519

530520
// if needsDealloc isn't statically false, add cleanup region. Always
531521
// do this for allocatable boxes because they might have been re-allocated
532522
// in the body of the loop/parallel region
533-
534523
std::optional<int64_t> cstNeedsDealloc =
535524
fir::getIntIfConstant(needsDealloc);
536525
assert(cstNeedsDealloc.has_value() &&

flang/test/Lower/OpenMP/DelayedPrivatization/target-private-multiple-variables.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
! XFAIL: *
21
! Tests delayed privatization for `targets ... private(..)` for allocatables.
32

43
! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --enable-delayed-privatization-staging \

flang/test/Lower/OpenMP/delayed-privatization-array.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
! Test delayed privatization for arrays.
2-
! XFAIL: *
32

43
! RUN: split-file %s %t
54

flang/test/Lower/OpenMP/parallel-reduction-array-lb.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
! RUN: bbc -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s
22
! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s
3-
! XFAIL: *
43

54
program reduce
65
integer, dimension(2:4, 2) :: i = 0

flang/test/Lower/OpenMP/parallel-reduction-array2.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
! RUN: bbc -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s
22
! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s
3-
! XFAIL: *
43

54
program reduce
65
integer, dimension(3) :: i = 0

flang/test/Lower/OpenMP/parallel-reduction3.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
! RUN: bbc -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s
22
! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s
3-
! XFAIL: *
43

54
! CHECK-LABEL: omp.declare_reduction @add_reduction_byref_box_Uxi32 : !fir.ref<!fir.box<!fir.array<?xi32>>> alloc {
65
! CHECK: %[[VAL_8:.*]] = fir.alloca !fir.box<!fir.array<?xi32>>

flang/test/Lower/OpenMP/reduction-array-intrinsic.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
! RUN: bbc -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s
22
! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s
3-
! XFAIL: *
43

54
subroutine max_array_reduction(l, r)
65
integer :: l(:), r(:)

flang/test/Lower/OpenMP/taskgroup-task-array-reduction.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
! RUN: bbc -emit-hlfir -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
22
! RUN: %flang_fc1 -emit-hlfir -fopenmp -fopenmp-version=50 -o - %s 2>&1 | FileCheck %s
3-
! XFAIL: *
43

54
! CHECK-LABEL: omp.declare_reduction @add_reduction_byref_box_Uxf32 : !fir.ref<!fir.box<!fir.array<?xf32>>> alloc {
65
! [...]

flang/test/Lower/OpenMP/wsloop-reduction-array-assumed-shape.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
! RUN: bbc -emit-hlfir -fopenmp -o - %s | FileCheck %s
22
! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s | FileCheck %s
3-
! XFAIL: *
43

54
program reduce_assumed_shape
65
real(8), dimension(2) :: r

flang/test/Lower/OpenMP/wsloop-reduction-array.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
! RUN: bbc -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s
22
! RUN: %flang_fc1 -emit-hlfir -fopenmp -o - %s 2>&1 | FileCheck %s
3-
! XFAIL: *
43
program reduce
54
integer :: i = 0
65
integer, dimension(2) :: r = 0

0 commit comments

Comments
 (0)