Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 41 additions & 30 deletions flang/lib/Optimizer/OpenMP/DoConcurrentConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "mlir/Analysis/SliceAnalysis.h"
#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
#include "mlir/IR/IRMapping.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "mlir/Transforms/RegionUtils.h"

namespace flangomp {
Expand Down Expand Up @@ -161,27 +161,34 @@ void collectLoopLocalValues(fir::DoConcurrentLoopOp loop,
///
/// \param rewriter - builder used for updating \p allocRegion.
static void localizeLoopLocalValue(mlir::Value local, mlir::Region &allocRegion,
mlir::ConversionPatternRewriter &rewriter) {
mlir::PatternRewriter &rewriter) {
rewriter.moveOpBefore(local.getDefiningOp(), &allocRegion.front().front());
}
} // namespace looputils

class DoConcurrentConversion
: public mlir::OpConversionPattern<fir::DoConcurrentOp> {
: public mlir::OpRewritePattern<fir::DoConcurrentOp> {
public:
using mlir::OpConversionPattern<fir::DoConcurrentOp>::OpConversionPattern;
using mlir::OpRewritePattern<fir::DoConcurrentOp>::OpRewritePattern;

DoConcurrentConversion(
mlir::MLIRContext *context, bool mapToDevice,
llvm::DenseSet<fir::DoConcurrentOp> &concurrentLoopsToSkip,
mlir::SymbolTable &moduleSymbolTable)
: OpConversionPattern(context), mapToDevice(mapToDevice),
: OpRewritePattern(context), mapToDevice(mapToDevice),
concurrentLoopsToSkip(concurrentLoopsToSkip),
moduleSymbolTable(moduleSymbolTable) {}

mlir::LogicalResult
matchAndRewrite(fir::DoConcurrentOp doLoop, OpAdaptor adaptor,
mlir::ConversionPatternRewriter &rewriter) const override {
matchAndRewrite(fir::DoConcurrentOp doLoop,
mlir::PatternRewriter &rewriter) const override {
// TODO: This pass should use "walkAndApplyPatterns", but that driver does
// not support pre-order traversals yet.
if (doLoop->getParentOfType<fir::DoConcurrentOp>())
return rewriter.notifyMatchFailure(
doLoop, "skipping op to enforce pre-order traversal");
if (concurrentLoopsToSkip.contains(doLoop))
return rewriter.notifyMatchFailure(doLoop, "skipping concurrent loop");
if (mapToDevice)
return doLoop.emitError(
"not yet implemented: Mapping `do concurrent` loops to device");
Expand Down Expand Up @@ -231,9 +238,8 @@ class DoConcurrentConversion
rewriter.moveOpBefore(op, allocBlock, allocBlock->begin());
}

// Mark `unordered` loops that are not perfectly nested to be skipped from
// the legality check of the `ConversionTarget` since we are not interested
// in mapping them to OpenMP.
// Mark `unordered` loops that are not perfectly nested to be skipped since
// we are not interested in mapping them to OpenMP.
ompLoopNest->walk([&](fir::DoConcurrentOp doLoop) {
concurrentLoopsToSkip.insert(doLoop);
});
Expand All @@ -245,7 +251,7 @@ class DoConcurrentConversion

private:
mlir::omp::ParallelOp
genParallelOp(mlir::Location loc, mlir::ConversionPatternRewriter &rewriter,
genParallelOp(mlir::Location loc, mlir::PatternRewriter &rewriter,
looputils::InductionVariableInfos &ivInfos,
mlir::IRMapping &mapper) const {
auto parallelOp = mlir::omp::ParallelOp::create(rewriter, loc);
Expand All @@ -256,18 +262,17 @@ class DoConcurrentConversion
return parallelOp;
}

void genLoopNestIndVarAllocs(mlir::ConversionPatternRewriter &rewriter,
void genLoopNestIndVarAllocs(mlir::PatternRewriter &rewriter,
looputils::InductionVariableInfos &ivInfos,
mlir::IRMapping &mapper) const {

for (auto &indVarInfo : ivInfos)
genInductionVariableAlloc(rewriter, indVarInfo.iterVarMemDef, mapper);
}

mlir::Operation *
genInductionVariableAlloc(mlir::ConversionPatternRewriter &rewriter,
mlir::Operation *indVarMemDef,
mlir::IRMapping &mapper) const {
mlir::Operation *genInductionVariableAlloc(mlir::PatternRewriter &rewriter,
mlir::Operation *indVarMemDef,
mlir::IRMapping &mapper) const {
assert(
indVarMemDef != nullptr &&
"Induction variable memdef is expected to have a defining operation.");
Expand All @@ -285,8 +290,7 @@ class DoConcurrentConversion
}

void
genLoopNestClauseOps(mlir::Location loc,
mlir::ConversionPatternRewriter &rewriter,
genLoopNestClauseOps(mlir::Location loc, mlir::PatternRewriter &rewriter,
fir::DoConcurrentLoopOp loop, mlir::IRMapping &mapper,
mlir::omp::LoopNestOperands &loopNestClauseOps) const {
assert(loopNestClauseOps.loopLowerBounds.empty() &&
Expand All @@ -308,8 +312,8 @@ class DoConcurrentConversion
}

mlir::omp::LoopNestOp
genWsLoopOp(mlir::ConversionPatternRewriter &rewriter,
fir::DoConcurrentLoopOp loop, mlir::IRMapping &mapper,
genWsLoopOp(mlir::PatternRewriter &rewriter, fir::DoConcurrentLoopOp loop,
mlir::IRMapping &mapper,
const mlir::omp::LoopNestOperands &clauseOps,
bool isComposite) const {
mlir::omp::WsloopOperands wsloopClauseOps;
Expand Down Expand Up @@ -472,18 +476,25 @@ class DoConcurrentConversionPass
patterns.insert<DoConcurrentConversion>(
context, mapTo == flangomp::DoConcurrentMappingKind::DCMK_Device,
concurrentLoopsToSkip, moduleSymbolTable);
mlir::ConversionTarget target(*context);
target.addDynamicallyLegalOp<fir::DoConcurrentOp>(
[&](fir::DoConcurrentOp op) {
return concurrentLoopsToSkip.contains(op);
});
target.markUnknownOpDynamicallyLegal(
[](mlir::Operation *) { return true; });

if (mlir::failed(
mlir::applyFullConversion(module, target, std::move(patterns)))) {

// TODO: This pass should use "walkAndApplyPatterns", but that driver does
// not support pre-order traversals yet.
if (mlir::failed(applyPatternsGreedily(module.getOperation(),
std::move(patterns)))) {
Comment on lines +482 to +483
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately FIR doesn't fully support region simplification. Please could you add

mlir::GreedyRewriteConfig config;
// Prevent the pattern driver from merging blocks.
config.setRegionSimplificationLevel(
    mlir::GreedySimplifyRegionLevel::Disabled);

if (mlir::failed(applyPatternsGreedily(module.getOperation(),
                                            std::move(patterns), config))) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a better solution. We can keep the dialect conversion here. Then we don't have to play tricks to enforce a certain traversal order.

Instead, we can switch to the new One-Shot Dialect conversion driver in the same commit that enables replaceAllUsesWith. There's still an API violation in the code (calling eraseArgument in the pattern), but the new driver can handle those a bit better. Can you take a look at the Flang-related changes of that PR instead?

module.emitError("failed to apply patterns");
signalPassFailure();
}

// Make sure that all loops were converted.
mlir::WalkResult status = module->walk([&](fir::DoConcurrentOp op) {
if (concurrentLoopsToSkip.contains(op))
return mlir::WalkResult::advance();

op.emitError("failed to convert operation");
return mlir::WalkResult::interrupt();
});
if (status.wasInterrupted())
signalPassFailure();
}
};
} // namespace
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Transforms/DoConcurrent/basic_device.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func.func @do_concurrent_basic() attributes {fir.bindc_name = "do_concurrent_bas
%c1 = arith.constant 1 : index

// expected-error@+2 {{not yet implemented: Mapping `do concurrent` loops to device}}
// expected-error@below {{failed to legalize operation 'fir.do_concurrent'}}
// expected-error@below {{failed to convert operation}}
fir.do_concurrent {
%0 = fir.alloca i32 {bindc_name = "i"}
%1:2 = hlfir.declare %0 {uniq_name = "_QFEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
Expand Down
7 changes: 4 additions & 3 deletions flang/test/Transforms/DoConcurrent/basic_host.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

! CHECK-LABEL: DO_CONCURRENT_BASIC
program do_concurrent_basic
! CHECK: %[[C1:.*]] = arith.constant 1 : i32
! CHECK: %[[C10:.*]] = arith.constant 10 : i32
! CHECK: %[[STEP:.*]] = arith.constant 1 : index

! CHECK: %[[ARR:.*]]:2 = hlfir.declare %{{.*}}(%{{.*}}) {uniq_name = "_QFEa"} : (!fir.ref<!fir.array<10xi32>>, !fir.shape<1>) -> (!fir.ref<!fir.array<10xi32>>, !fir.ref<!fir.array<10xi32>>)

implicit none
Expand All @@ -15,11 +19,8 @@ program do_concurrent_basic

! CHECK-NOT: fir.do_loop

! CHECK: %[[C1:.*]] = arith.constant 1 : i32
! CHECK: %[[LB:.*]] = fir.convert %[[C1]] : (i32) -> index
! CHECK: %[[C10:.*]] = arith.constant 10 : i32
! CHECK: %[[UB:.*]] = fir.convert %[[C10]] : (i32) -> index
! CHECK: %[[STEP:.*]] = arith.constant 1 : index

! CHECK: omp.parallel {

Expand Down
6 changes: 3 additions & 3 deletions flang/test/Transforms/DoConcurrent/basic_host.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

// CHECK-LABEL: func.func @do_concurrent_basic
func.func @do_concurrent_basic() attributes {fir.bindc_name = "do_concurrent_basic"} {
// CHECK: %[[C1:.*]] = arith.constant 1 : i32
// CHECK: %[[C10:.*]] = arith.constant 10 : i32
// CHECK: %[[STEP:.*]] = arith.constant 1 : index
// CHECK: %[[ARR:.*]]:2 = hlfir.declare %{{.*}}(%{{.*}}) {uniq_name = "_QFEa"} : (!fir.ref<!fir.array<10xi32>>, !fir.shape<1>) -> (!fir.ref<!fir.array<10xi32>>, !fir.ref<!fir.array<10xi32>>)

%2 = fir.address_of(@_QFEa) : !fir.ref<!fir.array<10xi32>>
Expand All @@ -18,11 +21,8 @@ func.func @do_concurrent_basic() attributes {fir.bindc_name = "do_concurrent_bas

// CHECK-NOT: fir.do_concurrent

// CHECK: %[[C1:.*]] = arith.constant 1 : i32
// CHECK: %[[LB:.*]] = fir.convert %[[C1]] : (i32) -> index
// CHECK: %[[C10:.*]] = arith.constant 10 : i32
// CHECK: %[[UB:.*]] = fir.convert %[[C10]] : (i32) -> index
// CHECK: %[[STEP:.*]] = arith.constant 1 : index

// CHECK: omp.parallel {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ func.func @_QPlocal_spec_translation() {
// CHECK: omp.private {type = private} @[[PRIVATIZER:.*local_spec_translationElocal_var.*.omp]] : f32

// CHECK: func.func @_QPlocal_spec_translation
// CHECK: %[[C42:.*]] = arith.constant 4.200000e+01 : f32
// CHECK: %[[LOCAL_VAR:.*]] = fir.alloca f32 {bindc_name = "local_var", {{.*}}}
// CHECK: %[[LOCAL_VAR_DECL:.*]]:2 = hlfir.declare %[[LOCAL_VAR]]
// CHECK: omp.parallel {
// CHECK: omp.wsloop private(@[[PRIVATIZER]] %[[LOCAL_VAR_DECL]]#0 -> %[[LOCAL_ARG:.*]] : !fir.ref<f32>) {
// CHECK: omp.loop_nest {{.*}} {
// CHECK: %[[PRIV_DECL:.*]]:2 = hlfir.declare %[[LOCAL_ARG]]
// CHECK: %[[C42:.*]] = arith.constant
// CHECK: hlfir.assign %[[C42]] to %[[PRIV_DECL]]#0
// CHECK: omp.yield
// CHECK: }
Expand Down
17 changes: 8 additions & 9 deletions flang/test/Transforms/DoConcurrent/multiple_iteration_ranges.f90
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,21 @@ program main
! CHECK: func.func @_QQmain

! CHECK: %[[C3:.*]] = arith.constant 3 : i32
! CHECK: %[[LB_I:.*]] = fir.convert %[[C3]] : (i32) -> index
! CHECK: %[[C20:.*]] = arith.constant 20 : i32
! CHECK: %[[C1:.*]] = arith.constant 1 : index
! CHECK: %[[C5:.*]] = arith.constant 5 : i32
! CHECK: %[[C40:.*]] = arith.constant 40 : i32
! CHECK: %[[C7:.*]] = arith.constant 7 : i32
! CHECK: %[[C60:.*]] = arith.constant 60 : i32

! CHECK: %[[LB_I:.*]] = fir.convert %[[C3]] : (i32) -> index
! CHECK: %[[UB_I:.*]] = fir.convert %[[C20]] : (i32) -> index
! CHECK: %[[STEP_I:.*]] = arith.constant 1 : index

! CHECK: %[[C5:.*]] = arith.constant 5 : i32
! CHECK: %[[LB_J:.*]] = fir.convert %[[C5]] : (i32) -> index
! CHECK: %[[C40:.*]] = arith.constant 40 : i32
! CHECK: %[[UB_J:.*]] = fir.convert %[[C40]] : (i32) -> index
! CHECK: %[[STEP_J:.*]] = arith.constant 1 : index

! CHECK: %[[C7:.*]] = arith.constant 7 : i32
! CHECK: %[[LB_K:.*]] = fir.convert %[[C7]] : (i32) -> index
! CHECK: %[[C60:.*]] = arith.constant 60 : i32
! CHECK: %[[UB_K:.*]] = fir.convert %[[C60]] : (i32) -> index
! CHECK: %[[STEP_K:.*]] = arith.constant 1 : index

! CHECK: omp.parallel {

Expand All @@ -53,7 +52,7 @@ program main
! CHECK-SAME: (%[[ARG0:[^[:space:]]+]], %[[ARG1:[^[:space:]]+]], %[[ARG2:[^[:space:]]+]])
! CHECK-SAME: : index = (%[[LB_I]], %[[LB_J]], %[[LB_K]])
! CHECK-SAME: to (%[[UB_I]], %[[UB_J]], %[[UB_K]]) inclusive
! CHECK-SAME: step (%[[STEP_I]], %[[STEP_J]], %[[STEP_K]]) {
! CHECK-SAME: step (%[[C1]], %[[C1]], %[[C1]]) {

! CHECK-NEXT: %[[IV_IDX_I:.*]] = fir.convert %[[ARG0]]
! CHECK-NEXT: fir.store %[[IV_IDX_I]] to %[[BINDING_I]]#0
Expand Down
3 changes: 2 additions & 1 deletion flang/test/Transforms/DoConcurrent/non_const_bounds.f90
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ subroutine foo(n)

end program main

! CHECK: %[[C1:.*]] = arith.constant 1 : index

! CHECK: %[[N_DECL:.*]]:2 = hlfir.declare %{{.*}} dummy_scope %{{.*}} {uniq_name = "_QFFfooEn"}

! CHECK: fir.load

! CHECK: %[[LB:.*]] = fir.convert %{{c1_.*}} : (i32) -> index
! CHECK: %[[N_VAL:.*]] = fir.load %[[N_DECL]]#0 : !fir.ref<i32>
! CHECK: %[[UB:.*]] = fir.convert %[[N_VAL]] : (i32) -> index
! CHECK: %[[C1:.*]] = arith.constant 1 : index

! CHECK: omp.parallel {

Expand Down
4 changes: 2 additions & 2 deletions flang/test/Transforms/DoConcurrent/reduce_add.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ func.func @_QPdo_concurrent_reduce() {
// CHECK: }

// CHECK-LABEL: func.func @_QPdo_concurrent_reduce() {
// CHECK: %[[VAL_4:.*]] = arith.constant 1 : index
// CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
// CHECK: %[[VAL_0:.*]] = fir.alloca i32 {bindc_name = "i"}
// CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFdo_concurrent_reduceEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
// CHECK: %[[VAL_2:.*]] = fir.alloca i32 {bindc_name = "s", uniq_name = "_QFdo_concurrent_reduceEs"}
// CHECK: %[[VAL_3:.*]]:2 = hlfir.declare %[[VAL_2]] {uniq_name = "_QFdo_concurrent_reduceEs"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
// CHECK: %[[VAL_4:.*]] = arith.constant 1 : index
// CHECK: omp.parallel {
// CHECK: %[[VAL_5:.*]] = fir.alloca i32 {bindc_name = "i"}
// CHECK: %[[VAL_6:.*]]:2 = hlfir.declare %[[VAL_5]] {uniq_name = "_QFdo_concurrent_reduceEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
Expand All @@ -59,7 +60,6 @@ func.func @_QPdo_concurrent_reduce() {
// CHECK: fir.store %[[VAL_9]] to %[[VAL_6]]#0 : !fir.ref<i32>
// CHECK: %[[VAL_10:.*]]:2 = hlfir.declare %[[VAL_7]] {uniq_name = "_QFdo_concurrent_reduceEs"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
// CHECK: %[[VAL_11:.*]] = fir.load %[[VAL_10]]#0 : !fir.ref<i32>
// CHECK: %[[VAL_12:.*]] = arith.constant 1 : i32
// CHECK: %[[VAL_13:.*]] = arith.addi %[[VAL_11]], %[[VAL_12]] : i32
// CHECK: hlfir.assign %[[VAL_13]] to %[[VAL_10]]#0 : i32, !fir.ref<i32>
// CHECK: omp.yield
Expand Down
2 changes: 1 addition & 1 deletion flang/test/Transforms/DoConcurrent/reduce_all_regions.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ func.func @_QPdo_concurrent_reduce() {
// CHECK: }

// CHECK-LABEL: func.func @_QPdo_concurrent_reduce() {
// CHECK: %[[VAL_4:.*]] = arith.constant 1 : index
// CHECK: %[[VAL_0:.*]] = fir.alloca i32 {bindc_name = "i"}
// CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFdo_concurrent_reduceEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
// CHECK: %[[VAL_2:.*]] = fir.alloca i32 {bindc_name = "s", uniq_name = "_QFdo_concurrent_reduceEs"}
// CHECK: %[[VAL_3:.*]]:2 = hlfir.declare %[[VAL_2]] {uniq_name = "_QFdo_concurrent_reduceEs"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
// CHECK: %[[VAL_4:.*]] = arith.constant 1 : index
// CHECK: omp.parallel {
// CHECK: %[[VAL_5:.*]] = fir.alloca i32 {bindc_name = "i"}
// CHECK: %[[VAL_6:.*]]:2 = hlfir.declare %[[VAL_5]] {uniq_name = "_QFdo_concurrent_reduceEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Transforms/DoConcurrent/reduce_local.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ fir.declare_reduction @add_reduction_i32 : i32 init {
// CHECK: omp.private {type = private} @_QFdo_concurrent_reduceEl_private_i32.omp : i32

// CHECK-LABEL: func.func @_QPdo_concurrent_reduce() {
// CHECK: %[[VAL_6:.*]] = arith.constant 1 : index
// CHECK: %[[VAL_15:.*]] = arith.constant 1 : i32
// CHECK: %[[VAL_0:.*]] = fir.alloca i32 {bindc_name = "i"}
// CHECK: %[[VAL_1:.*]]:2 = hlfir.declare %[[VAL_0]] {uniq_name = "_QFdo_concurrent_reduceEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
// CHECK: %[[VAL_2:.*]] = fir.alloca i32 {bindc_name = "l", uniq_name = "_QFdo_concurrent_reduceEl"}
// CHECK: %[[VAL_3:.*]]:2 = hlfir.declare %[[VAL_2]] {uniq_name = "_QFdo_concurrent_reduceEl"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
// CHECK: %[[VAL_4:.*]] = fir.alloca i32 {bindc_name = "s", uniq_name = "_QFdo_concurrent_reduceEs"}
// CHECK: %[[VAL_5:.*]]:2 = hlfir.declare %[[VAL_4]] {uniq_name = "_QFdo_concurrent_reduceEs"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
// CHECK: %[[VAL_6:.*]] = arith.constant 1 : index
// CHECK: omp.parallel {
// CHECK: %[[VAL_7:.*]] = fir.alloca i32 {bindc_name = "i"}
// CHECK: %[[VAL_8:.*]]:2 = hlfir.declare %[[VAL_7]] {uniq_name = "_QFdo_concurrent_reduceEi"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
Expand All @@ -67,7 +68,6 @@ fir.declare_reduction @add_reduction_i32 : i32 init {
// CHECK: fir.store %[[VAL_12]] to %[[VAL_8]]#0 : !fir.ref<i32>
// CHECK: %[[VAL_13:.*]]:2 = hlfir.declare %[[VAL_9]] {uniq_name = "_QFdo_concurrent_reduceEl"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
// CHECK: %[[VAL_14:.*]]:2 = hlfir.declare %[[VAL_10]] {uniq_name = "_QFdo_concurrent_reduceEs"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
// CHECK: %[[VAL_15:.*]] = arith.constant 1 : i32
// CHECK: hlfir.assign %[[VAL_15]] to %[[VAL_13]]#0 : i32, !fir.ref<i32>
// CHECK: %[[VAL_16:.*]] = fir.load %[[VAL_14]]#0 : !fir.ref<i32>
// CHECK: %[[VAL_17:.*]] = fir.load %[[VAL_13]]#0 : !fir.ref<i32>
Expand Down