diff --git a/flang/include/flang/Optimizer/Builder/HLFIRTools.h b/flang/include/flang/Optimizer/Builder/HLFIRTools.h index 190f2eaf2e6f8..f96d2228915fe 100644 --- a/flang/include/flang/Optimizer/Builder/HLFIRTools.h +++ b/flang/include/flang/Optimizer/Builder/HLFIRTools.h @@ -485,9 +485,18 @@ hlfir::ElementalOp cloneToElementalOp(mlir::Location loc, /// would be incorrect. bool elementalOpMustProduceTemp(hlfir::ElementalOp elemental); -std::pair -createTempFromMold(mlir::Location loc, fir::FirOpBuilder &builder, - hlfir::Entity mold); +/// Create a new temporary based on the provided \p mold entity. +/// +/// The returned temporary has the same element type, shape and type parameters +/// as the mold. When possible, the storage is stack-allocated; otherwise it is +/// heap-allocated (for instance for arrays with dynamic shape or polymorphic +/// cases). The bool result indicates whether heap allocation was used. +/// +/// If the returned bool is true, callers are responsible for arranging cleanup +/// (e.g., generating destruction/deallocation code at an appropriate point). +std::pair createTempFromMold(mlir::Location loc, + fir::FirOpBuilder &builder, + hlfir::Entity mold); // TODO: this does not support polymorphic molds hlfir::Entity createStackTempFromMold(mlir::Location loc, diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp index 3a022e188bbdd..d4fe63f3f2b92 100644 --- a/flang/lib/Lower/Bridge.cpp +++ b/flang/lib/Lower/Bridge.cpp @@ -4994,8 +4994,7 @@ class FirConverter : public Fortran::lower::AbstractConverter { hlfir::Entity entity{baseValue}; auto [temp, cleanup] = hlfir::createTempFromMold(loc, builder, entity); - auto needCleanup = fir::getIntIfConstant(cleanup); - if (needCleanup && *needCleanup) { + if (cleanup) { if (auto declareOp = mlir::dyn_cast(temp.getDefiningOp())) temps.push_back(declareOp.getMemref()); diff --git a/flang/lib/Lower/Support/PrivateReductionUtils.cpp b/flang/lib/Lower/Support/PrivateReductionUtils.cpp index 1b09801c607c6..d433ce367d259 100644 --- a/flang/lib/Lower/Support/PrivateReductionUtils.cpp +++ b/flang/lib/Lower/Support/PrivateReductionUtils.cpp @@ -516,15 +516,10 @@ void PopulateInitAndCleanupRegionsHelper::initAndCleanupBoxedArray( return createStackTempFromMold(loc, builder, source); auto [temp, needsDealloc] = createTempFromMold(loc, builder, source); - // if needsDealloc isn't statically false, add cleanup region. Always + // if needsDealloc, add cleanup region. Always // do this for allocatable boxes because they might have been re-allocated // in the body of the loop/parallel region - - std::optional cstNeedsDealloc = - fir::getIntIfConstant(needsDealloc); - assert(cstNeedsDealloc.has_value() && - "createTempFromMold decides this statically"); - if (cstNeedsDealloc.has_value() && *cstNeedsDealloc != false) { + if (needsDealloc) { mlir::OpBuilder::InsertionGuard guard(builder); createCleanupRegion(converter, loc, argType, cleanupRegion, sym, isDoConcurrent); diff --git a/flang/lib/Optimizer/Builder/HLFIRTools.cpp b/flang/lib/Optimizer/Builder/HLFIRTools.cpp index dbfcae1081c87..93dfc577665ce 100644 --- a/flang/lib/Optimizer/Builder/HLFIRTools.cpp +++ b/flang/lib/Optimizer/Builder/HLFIRTools.cpp @@ -1392,7 +1392,7 @@ bool hlfir::elementalOpMustProduceTemp(hlfir::ElementalOp elemental) { return false; } -std::pair +std::pair hlfir::createTempFromMold(mlir::Location loc, fir::FirOpBuilder &builder, hlfir::Entity mold) { assert(!mold.isAssumedRank() && @@ -1425,7 +1425,7 @@ hlfir::createTempFromMold(mlir::Location loc, fir::FirOpBuilder &builder, loc, mold.getElementOrSequenceType(), shape, extents, lenParams, genTempDeclareOp, mold.isPolymorphic() ? mold.getBase() : nullptr, useStack, tmpName); - return {hlfir::Entity{base}, builder.createBool(loc, isHeapAlloc)}; + return {hlfir::Entity{base}, isHeapAlloc}; } hlfir::Entity hlfir::createStackTempFromMold(mlir::Location loc, diff --git a/flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp b/flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp index 1c77636d301e9..53ff13f5a9d28 100644 --- a/flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp +++ b/flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp @@ -136,12 +136,12 @@ createArrayTemp(mlir::Location loc, fir::FirOpBuilder &builder, static mlir::Value copyInTempAndPackage(mlir::Location loc, fir::FirOpBuilder &builder, hlfir::Entity source) { - auto [temp, cleanup] = hlfir::createTempFromMold(loc, builder, source); + auto [temp, mustFree] = hlfir::createTempFromMold(loc, builder, source); assert(!temp.isAllocatable() && "expect temp to already be allocated"); hlfir::AssignOp::create(builder, loc, source, temp, /*realloc=*/false, /*keep_lhs_length_if_realloc=*/false, /*temporary_lhs=*/true); - return packageBufferizedExpr(loc, builder, temp, cleanup); + return packageBufferizedExpr(loc, builder, temp, mustFree); } struct AsExprOpConversion : public mlir::OpConversionPattern { diff --git a/flang/test/HLFIR/as_expr-codegen.fir b/flang/test/HLFIR/as_expr-codegen.fir index e4dd2a9a3fc37..762f7da58d89d 100644 --- a/flang/test/HLFIR/as_expr-codegen.fir +++ b/flang/test/HLFIR/as_expr-codegen.fir @@ -13,8 +13,8 @@ func.func @char_expr(%addr: !fir.ref>, %len: index) { // CHECK: %[[VAL_2:.*]]:2 = hlfir.declare %[[VAL_0]] typeparams %[[VAL_1]] {uniq_name = "c"} : (!fir.ref>, index) -> (!fir.boxchar<1>, !fir.ref>) // CHECK: %[[VAL_3:.*]] = fir.alloca !fir.char<1,?>(%[[VAL_1]] : index) {bindc_name = ".tmp"} // CHECK: %[[VAL_4:.*]]:2 = hlfir.declare %[[VAL_3]] typeparams %[[VAL_1]] {uniq_name = ".tmp"} : (!fir.ref>, index) -> (!fir.boxchar<1>, !fir.ref>) -// CHECK: %[[VAL_5:.*]] = arith.constant false // CHECK: hlfir.assign %[[VAL_2]]#0 to %[[VAL_4]]#0 temporary_lhs : !fir.boxchar<1>, !fir.boxchar<1> +// CHECK: %[[VAL_5:.*]] = arith.constant false // CHECK: %[[VAL_6:.*]] = fir.undefined tuple, i1> // CHECK: %[[VAL_7:.*]] = fir.insert_value %[[VAL_6]], %[[VAL_5]], [1 : index] : (tuple, i1>, i1) -> tuple, i1> // CHECK: %[[VAL_8:.*]] = fir.insert_value %[[VAL_7]], %[[VAL_4]]#0, [0 : index] : (tuple, i1>, !fir.boxchar<1>) -> tuple, i1> @@ -30,8 +30,8 @@ func.func @char_expr_2(%addr: !fir.ref>, %len: index) { // CHECK: %[[VAL_2:.*]] = fir.alloca !fir.char<1,10> {bindc_name = ".tmp"} // CHECK: %[[VAL_3:.*]]:2 = hlfir.declare %[[VAL_0]] typeparams %[[VAL_1]] {uniq_name = "c"} : (!fir.ref>, index) -> (!fir.ref>, !fir.ref>) // CHECK: %[[VAL_4:.*]]:2 = hlfir.declare %[[VAL_2]] typeparams %[[VAL_1]] {uniq_name = ".tmp"} : (!fir.ref>, index) -> (!fir.ref>, !fir.ref>) -// CHECK: %[[VAL_5:.*]] = arith.constant false // CHECK: hlfir.assign %[[VAL_3]]#0 to %[[VAL_4]]#0 temporary_lhs : !fir.ref>, !fir.ref> +// CHECK: %[[VAL_5:.*]] = arith.constant false // CHECK: %[[VAL_6:.*]] = fir.undefined tuple>, i1> // CHECK: %[[VAL_7:.*]] = fir.insert_value %[[VAL_6]], %[[VAL_5]], [1 : index] : (tuple>, i1>, i1) -> tuple>, i1> // CHECK: %[[VAL_8:.*]] = fir.insert_value %[[VAL_7]], %[[VAL_4]]#0, [0 : index] : (tuple>, i1>, !fir.ref>) -> tuple>, i1> @@ -47,8 +47,8 @@ func.func @shape_from_type(%arg0 : !fir.ref>) { // CHECK: %[[VAL_3:.*]] = fir.shape %[[VAL_1]], %[[VAL_2]] : (index, index) -> !fir.shape<2> // CHECK: %[[VAL_4:.*]] = fir.allocmem !fir.array<10x20xi32> {bindc_name = ".tmp", uniq_name = ""} // CHECK: %[[VAL_6:.*]]:2 = hlfir.declare %[[VAL_4]](%[[VAL_3]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<2>) -> (!fir.heap>, !fir.heap>) -// CHECK: %[[VAL_5:.*]] = arith.constant true // CHECK: hlfir.assign %[[VAL_0]] to %[[VAL_6]]#0 temporary_lhs : !fir.ref>, !fir.heap> +// CHECK: %[[VAL_5:.*]] = arith.constant true // CHECK: %[[VAL_7:.*]] = fir.undefined tuple>, i1> // CHECK: %[[VAL_8:.*]] = fir.insert_value %[[VAL_7]], %[[VAL_5]], [1 : index] : (tuple>, i1>, i1) -> tuple>, i1> // CHECK: %[[VAL_9:.*]] = fir.insert_value %[[VAL_8]], %[[VAL_6]]#0, [0 : index] : (tuple>, i1>, !fir.heap>) -> tuple>, i1> @@ -66,8 +66,8 @@ func.func @shape_from_box(%arg0 : !fir.box>) { // CHECK: %[[VAL_4:.*]] = fir.shape %[[VAL_1]], %[[VAL_3]]#1 : (index, index) -> !fir.shape<2> // CHECK: %[[VAL_5:.*]] = fir.allocmem !fir.array<10x?xi32>, %[[VAL_3]]#1 {bindc_name = ".tmp", uniq_name = ""} // CHECK: %[[VAL_7:.*]]:2 = hlfir.declare %[[VAL_5]](%[[VAL_4]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<2>) -> (!fir.box>, !fir.heap>) -// CHECK: %[[VAL_6:.*]] = arith.constant true // CHECK: hlfir.assign %[[VAL_0]] to %[[VAL_7]]#0 temporary_lhs : !fir.box>, !fir.box> +// CHECK: %[[VAL_6:.*]] = arith.constant true // CHECK: %[[VAL_8:.*]] = fir.undefined tuple>, i1> // CHECK: %[[VAL_9:.*]] = fir.insert_value %[[VAL_8]], %[[VAL_6]], [1 : index] : (tuple>, i1>, i1) -> tuple>, i1> // CHECK: %[[VAL_10:.*]] = fir.insert_value %[[VAL_9]], %[[VAL_7]]#0, [0 : index] : (tuple>, i1>, !fir.box>) -> tuple>, i1> diff --git a/flang/test/HLFIR/associate-codegen.fir b/flang/test/HLFIR/associate-codegen.fir index 5d0d67854365e..b5965431c6d4e 100644 --- a/flang/test/HLFIR/associate-codegen.fir +++ b/flang/test/HLFIR/associate-codegen.fir @@ -259,8 +259,8 @@ func.func @test_multiple_associations(%arg0: !hlfir.expr<1x2xi32>) { // CHECK: %[[VAL_6:.*]] = arith.constant 2 : index // CHECK: %[[VAL_7:.*]] = fir.allocmem !fir.array<1x2xi32> {bindc_name = ".tmp", uniq_name = ""} // CHECK: %[[VAL_9:.*]]:2 = hlfir.declare %[[VAL_7]](%[[VAL_4]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<2>) -> (!fir.heap>, !fir.heap>) -// CHECK: %[[VAL_8:.*]] = arith.constant true // CHECK: hlfir.assign %[[VAL_0]] to %[[VAL_9]]#0 temporary_lhs : !hlfir.expr<1x2xi32>, !fir.heap> +// CHECK: %[[VAL_8:.*]] = arith.constant true // CHECK: %[[VAL_10:.*]] = fir.undefined tuple>, i1> // CHECK: %[[VAL_11:.*]] = fir.insert_value %[[VAL_10]], %[[VAL_8]], [1 : index] : (tuple>, i1>, i1) -> tuple>, i1> // CHECK: %[[VAL_12:.*]] = fir.insert_value %[[VAL_11]], %[[VAL_9]]#0, [0 : index] : (tuple>, i1>, !fir.heap>) -> tuple>, i1> @@ -272,8 +272,8 @@ func.func @test_multiple_associations(%arg0: !hlfir.expr<1x2xi32>) { // CHECK: %[[VAL_17:.*]] = arith.constant 2 : index // CHECK: %[[VAL_18:.*]] = fir.allocmem !fir.array<1x2xi32> {bindc_name = ".tmp", uniq_name = ""} // CHECK: %[[VAL_20:.*]]:2 = hlfir.declare %[[VAL_18]](%[[VAL_15]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<2>) -> (!fir.heap>, !fir.heap>) -// CHECK: %[[VAL_19:.*]] = arith.constant true // CHECK: hlfir.assign %[[VAL_0]] to %[[VAL_20]]#0 temporary_lhs : !hlfir.expr<1x2xi32>, !fir.heap> +// CHECK: %[[VAL_19:.*]] = arith.constant true // CHECK: %[[VAL_21:.*]] = fir.undefined tuple>, i1> // CHECK: %[[VAL_22:.*]] = fir.insert_value %[[VAL_21]], %[[VAL_19]], [1 : index] : (tuple>, i1>, i1) -> tuple>, i1> // CHECK: %[[VAL_23:.*]] = fir.insert_value %[[VAL_22]], %[[VAL_20]]#0, [0 : index] : (tuple>, i1>, !fir.heap>) -> tuple>, i1> @@ -303,8 +303,8 @@ func.func @test_get_length(%arg0: !fir.ref>) { // CHECK: %[[VAL_1:.*]] = fir.alloca !fir.char<1,2> {bindc_name = ".tmp"} // CHECK: %[[VAL_2:.*]] = arith.constant 2 : index // CHECK: %[[VAL_4:.*]]:2 = hlfir.declare %[[VAL_1]] typeparams %[[VAL_2]] {uniq_name = ".tmp"} : (!fir.ref>, index) -> (!fir.ref>, !fir.ref>) -// CHECK: %[[VAL_3:.*]] = arith.constant false // CHECK: hlfir.assign %[[VAL_0]] to %[[VAL_4]]#0 temporary_lhs : !fir.ref>, !fir.ref> +// CHECK: %[[VAL_3:.*]] = arith.constant false // CHECK: %[[VAL_5:.*]] = fir.undefined tuple>, i1> // CHECK: %[[VAL_6:.*]] = fir.insert_value %[[VAL_5]], %[[VAL_3]], [1 : index] : (tuple>, i1>, i1) -> tuple>, i1> // CHECK: %[[VAL_7:.*]] = fir.insert_value %[[VAL_6]], %[[VAL_4]]#0, [0 : index] : (tuple>, i1>, !fir.ref>) -> tuple>, i1> @@ -355,8 +355,8 @@ func.func @_QPtest_multiple_expr_uses_inside_elemental() { // CHECK: fir.do_loop %[[VAL_15:.*]] = %[[VAL_14]] to %[[VAL_9]] step %[[VAL_14]] unordered { // CHECK: %[[VAL_16:.*]] = fir.alloca !fir.char<1,?>(%[[VAL_4]] : index) {bindc_name = ".tmp"} // CHECK: %[[VAL_18:.*]]:2 = hlfir.declare %[[VAL_16]] typeparams %[[VAL_4]] {uniq_name = ".tmp"} : (!fir.ref>, index) -> (!fir.boxchar<1>, !fir.ref>) -// CHECK: %[[VAL_17:.*]] = arith.constant false // CHECK: hlfir.assign %[[VAL_5]]#0 to %[[VAL_18]]#0 temporary_lhs : !fir.boxchar<1>, !fir.boxchar<1> +// CHECK: %[[VAL_17:.*]] = arith.constant false // CHECK: %[[VAL_19:.*]] = fir.undefined tuple, i1> // CHECK: %[[VAL_20:.*]] = fir.insert_value %[[VAL_19]], %[[VAL_17]], [1 : index] : (tuple, i1>, i1) -> tuple, i1> // CHECK: %[[VAL_21:.*]] = fir.insert_value %[[VAL_20]], %[[VAL_18]]#0, [0 : index] : (tuple, i1>, !fir.boxchar<1>) -> tuple, i1> @@ -407,8 +407,8 @@ func.func @_QPtest_multitple_associates_for_same_expr() { // CHECK: %[[VAL_12:.*]] = fir.insert_value %[[VAL_11]], %[[VAL_4]]#0, [0 : index] : (tuple>>, i1>, !fir.heap>>) -> tuple>>, i1> // CHECK: %[[VAL_13:.*]] = fir.allocmem !fir.array<10x!fir.char<1>> {bindc_name = ".tmp", uniq_name = ""} // CHECK: %[[VAL_15:.*]]:2 = hlfir.declare %[[VAL_13]](%[[VAL_2]]) typeparams %[[VAL_0]] {uniq_name = ".tmp"} : (!fir.heap>>, !fir.shape<1>, index) -> (!fir.heap>>, !fir.heap>>) -// CHECK: %[[VAL_14:.*]] = arith.constant true // CHECK: hlfir.assign %[[VAL_4]]#0 to %[[VAL_15]]#0 temporary_lhs : !fir.heap>>, !fir.heap>> +// CHECK: %[[VAL_14:.*]] = arith.constant true // CHECK: %[[VAL_16:.*]] = fir.undefined tuple>>, i1> // CHECK: %[[VAL_17:.*]] = fir.insert_value %[[VAL_16]], %[[VAL_14]], [1 : index] : (tuple>>, i1>, i1) -> tuple>>, i1> // CHECK: %[[VAL_18:.*]] = fir.insert_value %[[VAL_17]], %[[VAL_15]]#0, [0 : index] : (tuple>>, i1>, !fir.heap>>) -> tuple>>, i1> @@ -418,8 +418,8 @@ func.func @_QPtest_multitple_associates_for_same_expr() { // CHECK: fir.freemem %[[VAL_21]] : !fir.heap>> // CHECK: %[[VAL_22:.*]] = fir.allocmem !fir.array<10x!fir.char<1>> {bindc_name = ".tmp", uniq_name = ""} // CHECK: %[[VAL_24:.*]]:2 = hlfir.declare %[[VAL_22]](%[[VAL_2]]) typeparams %[[VAL_0]] {uniq_name = ".tmp"} : (!fir.heap>>, !fir.shape<1>, index) -> (!fir.heap>>, !fir.heap>>) -// CHECK: %[[VAL_23:.*]] = arith.constant true // CHECK: hlfir.assign %[[VAL_4]]#0 to %[[VAL_24]]#0 temporary_lhs : !fir.heap>>, !fir.heap>> +// CHECK: %[[VAL_23:.*]] = arith.constant true // CHECK: %[[VAL_25:.*]] = fir.undefined tuple>>, i1> // CHECK: %[[VAL_26:.*]] = fir.insert_value %[[VAL_25]], %[[VAL_23]], [1 : index] : (tuple>>, i1>, i1) -> tuple>>, i1> // CHECK: %[[VAL_27:.*]] = fir.insert_value %[[VAL_26]], %[[VAL_24]]#0, [0 : index] : (tuple>>, i1>, !fir.heap>>) -> tuple>>, i1> diff --git a/flang/test/HLFIR/bufferize-poly-expr.fir b/flang/test/HLFIR/bufferize-poly-expr.fir index 54cdfa38f81a2..2a448eea4f98a 100644 --- a/flang/test/HLFIR/bufferize-poly-expr.fir +++ b/flang/test/HLFIR/bufferize-poly-expr.fir @@ -27,8 +27,8 @@ func.func @test_poly_expr_without_associate() { // CHECK: %[[VAL_16:.*]] = fir.call @_FortranAAllocatableAllocate(%[[VAL_13]], %[[VAL_14]], %[[VAL_11]], %[[VAL_12:.*]], {{.*}} // CHECK: %[[VAL_17:.*]] = fir.load %[[VAL_0]] : !fir.ref>>> // CHECK: %[[VAL_18:.*]]:2 = hlfir.declare %[[VAL_17]] {uniq_name = ".tmp"} : (!fir.class>>) -> (!fir.class>, !fir.class>) -// CHECK: %[[VAL_19:.*]] = arith.constant true // CHECK: hlfir.assign %[[VAL_4]]#0 to %[[VAL_18]]#0 temporary_lhs : !fir.class>, !fir.class> +// CHECK: %[[VAL_19:.*]] = arith.constant true // CHECK: %[[VAL_20:.*]] = fir.undefined tuple>, i1> // CHECK: %[[VAL_21:.*]] = fir.insert_value %[[VAL_20]], %[[VAL_19]], [1 : index] : (tuple>, i1>, i1) -> tuple>, i1> // CHECK: %[[VAL_22:.*]] = fir.insert_value %[[VAL_21]], %[[VAL_18]]#0, [0 : index] : (tuple>, i1>, !fir.class>) -> tuple>, i1> @@ -84,8 +84,8 @@ func.func @test_poly_expr_with_associate(%arg1: !fir.class>>>> // CHECK: %[[VAL_21:.*]]:2 = hlfir.declare %[[VAL_20]] {uniq_name = ".tmp"} : (!fir.class>>>) -> (!fir.class>>, !fir.class>>) -// CHECK: %[[VAL_22:.*]] = arith.constant true // CHECK: hlfir.assign %[[VAL_4]] to %[[VAL_21]]#0 temporary_lhs : !fir.class>>>, !fir.class>> +// CHECK: %[[VAL_22:.*]] = arith.constant true // CHECK: %[[VAL_23:.*]] = fir.undefined tuple>>, i1> // CHECK: %[[VAL_24:.*]] = fir.insert_value %[[VAL_23]], %[[VAL_22]], [1 : index] : (tuple>>, i1>, i1) -> tuple>>, i1> // CHECK: %[[VAL_25:.*]] = fir.insert_value %[[VAL_24]], %[[VAL_21]]#0, [0 : index] : (tuple>>, i1>, !fir.class>>) -> tuple>>, i1> diff --git a/flang/test/HLFIR/element-codegen-issue-118922.fir b/flang/test/HLFIR/element-codegen-issue-118922.fir index da998cc7430e3..6c109e1224771 100644 --- a/flang/test/HLFIR/element-codegen-issue-118922.fir +++ b/flang/test/HLFIR/element-codegen-issue-118922.fir @@ -29,7 +29,6 @@ func.func @_QMmPbug(%val: !fir.char<1>, %var: !fir.ref !fir.shape<1> // CHECK: %[[VAL_6:.*]] = fir.allocmem !fir.array<10x!fir.char<1>> {bindc_name = ".tmp.array", uniq_name = ""} // CHECK: %[[VAL_7:.*]]:2 = hlfir.declare %[[VAL_6]](%[[VAL_5]]) typeparams %[[VAL_3]] {uniq_name = ".tmp.array"} : (!fir.heap>>, !fir.shape<1>, index) -> (!fir.heap>>, !fir.heap>>) -// CHECK: %[[VAL_8:.*]] = arith.constant true // CHECK: %[[VAL_9:.*]] = arith.constant 1 : index // CHECK: fir.do_loop %[[VAL_10:.*]] = %[[VAL_9]] to %[[VAL_4]] step %[[VAL_9]] unordered { // CHECK: %[[VAL_11:.*]] = fir.allocmem !fir.char<1> @@ -37,8 +36,8 @@ func.func @_QMmPbug(%val: !fir.char<1>, %var: !fir.ref>) -> !fir.ref> // CHECK: %[[VAL_13:.*]] = arith.constant 1 : index // CHECK: %[[VAL_15:.*]]:2 = hlfir.declare %[[VAL_2]] typeparams %[[VAL_13]] {uniq_name = ".tmp"} : (!fir.ref>, index) -> (!fir.ref>, !fir.ref>) -// CHECK: %[[VAL_14:.*]] = arith.constant false // CHECK: hlfir.assign %[[VAL_12]] to %[[VAL_15]]#0 temporary_lhs : !fir.ref>, !fir.ref> +// CHECK: %[[VAL_14:.*]] = arith.constant false // CHECK: %[[VAL_16:.*]] = fir.undefined tuple>, i1> // CHECK: %[[VAL_17:.*]] = fir.insert_value %[[VAL_16]], %[[VAL_14]], [1 : index] : (tuple>, i1>, i1) -> tuple>, i1> // CHECK: %[[VAL_18:.*]] = fir.insert_value %[[VAL_17]], %[[VAL_15]]#0, [0 : index] : (tuple>, i1>, !fir.ref>) -> tuple>, i1> diff --git a/flang/test/Lower/OpenMP/DelayedPrivatization/target-private-multiple-variables.f90 b/flang/test/Lower/OpenMP/DelayedPrivatization/target-private-multiple-variables.f90 index 5144b33cf4fe1..f3b939780c2b6 100644 --- a/flang/test/Lower/OpenMP/DelayedPrivatization/target-private-multiple-variables.f90 +++ b/flang/test/Lower/OpenMP/DelayedPrivatization/target-private-multiple-variables.f90 @@ -70,7 +70,6 @@ end subroutine target_allocatable ! CHECK-NEXT: %[[SHAPE:.*]] = fir.shape %[[BOX_DIMS]]#1 ! CHECK-NEXT: %[[DATA_ALLOC:.*]] = fir.allocmem !fir.array, %[[BOX_DIMS]]#1 ! CHECK-NEXT: %[[DECL:.*]]:2 = hlfir.declare %[[DATA_ALLOC:.*]](%[[SHAPE]]) -! CHECK-NEXT: %[[TRUE:.*]] = arith.constant true ! CHECK-NEXT: %[[C0_2:.*]] = arith.constant 0 : index ! CHECK-NEXT: %[[BOX_DIMS_2:.*]]:3 = fir.box_dims %[[MOLD]], %[[C0_2]] ! CHECK-NEXT: %[[SHAPE_SHIFT:.*]] = fir.shape_shift %[[BOX_DIMS_2]]#0, %[[BOX_DIMS_2]]#1 diff --git a/flang/test/Lower/OpenMP/delayed-privatization-allocatable-array.f90 b/flang/test/Lower/OpenMP/delayed-privatization-allocatable-array.f90 index 8446e99126f26..8ade5cdcd510e 100644 --- a/flang/test/Lower/OpenMP/delayed-privatization-allocatable-array.f90 +++ b/flang/test/Lower/OpenMP/delayed-privatization-allocatable-array.f90 @@ -37,7 +37,6 @@ subroutine delayed_privatization_private(var1, l1) ! CHECK-NEXT: %[[SHAPE:.*]] = fir.shape %[[DIMS]]#1 ! CHECK-NEXT: %[[MEM:.*]] = fir.allocmem !fir.array, %[[DIMS]]#1 ! CHECK-NEXT: %[[DECL:.*]]:2 = hlfir.declare %[[MEM]](%[[SHAPE]]) -! CHECK-NEXT: %[[TRUE:.*]] = arith.constant true ! CHECK-NEXT: %[[C0_2:.*]] = arith.constant 0 : index ! CHECK-NEXT: %[[DIMS_2:.*]]:3 = fir.box_dims %[[PRIV_ARG_VAL]], %[[C0_2]] ! CHECK-NEXT: %[[SHAPE_SHIFT:.*]] = fir.shape_shift %[[DIMS_2]]#0, %[[DIMS_2]]#1 diff --git a/flang/test/Lower/OpenMP/delayed-privatization-array.f90 b/flang/test/Lower/OpenMP/delayed-privatization-array.f90 index 0cda254924984..81df53dc51aca 100644 --- a/flang/test/Lower/OpenMP/delayed-privatization-array.f90 +++ b/flang/test/Lower/OpenMP/delayed-privatization-array.f90 @@ -39,7 +39,6 @@ subroutine delayed_privatization_private_1d(var1, l1, u1) ! ONE_DIM-NEXT: %[[SHAPE:.*]] = fir.shape %[[DIMS]]#1 ! ONE_DIM-NEXT: %[[ARRAY_ALLOC:.*]] = fir.allocmem !fir.array, %[[DIMS]]#1 ! ONE_DIM-NEXT: %[[DECL:.*]]:2 = hlfir.declare %[[ARRAY_ALLOC]](%[[SHAPE]]) -! ONE_DIM-NEXT: %[[TRUE:.*]] = arith.constant true ! ONE_DIM-NEXT: %[[C0_0:.*]] = arith.constant 0 ! ONE_DIM-NEXT: %[[DIMS2:.*]]:3 = fir.box_dims %[[PRIV_ARG_VAL]], %[[C0_0]] ! ONE_DIM-NEXT: %[[SHAPE_SHIFT:.*]] = fir.shape_shift %[[DIMS2]]#0, %[[DIMS2]]#1 @@ -77,7 +76,6 @@ subroutine delayed_privatization_private_2d(var1, l1, u1, l2, u2) ! TWO_DIM-NEXT: %[[SHAPE:.*]] = fir.shape %[[DIMS_0]]#1, %[[DIMS_1]]#1 ! TWO_DIM-NEXT: %[[ARRAY_ALLOC:.*]] = fir.allocmem !fir.array, %[[DIMS_0]]#1, %[[DIMS_1]]#1 ! TWO_DIM-NEXT: %[[DECL:.*]]:2 = hlfir.declare %[[ARRAY_ALLOC]](%[[SHAPE]]) -! TWO_DIM-NEXT: %[[TRUE:.*]] = arith.constant true ! TWO_DIM-NEXT: %[[C0_0:.*]] = arith.constant 0 ! TWO_DIM-NEXT: %[[DIMS2_0:.*]]:3 = fir.box_dims %[[PRIV_ARG_VAL]], %[[C0_0]] ! TWO_DIM-NEXT: %[[C1_0:.*]] = arith.constant 1 @@ -112,7 +110,6 @@ program main ! ONE_DIM_DEFAULT_LB-NEXT: %[[SHAPE:.*]] = fir.shape %[[C10]] ! ONE_DIM_DEFAULT_LB-NEXT: %[[ARRAY_ALLOC:.*]] = fir.allocmem !fir.array<10xi32> ! ONE_DIM_DEFAULT_LB-NEXT: %[[DECL:.*]]:2 = hlfir.declare %[[ARRAY_ALLOC]](%[[SHAPE]]) -! ONE_DIM_DEFAULT_LB-NEXT: %[[TRUE:.*]] = arith.constant true ! ONE_DIM_DEFAULT_LB-NEXT: %[[ONE:.*]] = arith.constant 1 : index ! ONE_DIM_DEFAULT_LB-NEXT: %[[TEN:.*]] = arith.constant 10 : index ! ONE_DIM_DEFAULT_LB-NEXT: %[[SHAPE_SHIFT:.*]] = fir.shape_shift %[[ONE]], %[[TEN]] diff --git a/flang/test/Lower/OpenMP/parallel-reduction-allocatable-array.f90 b/flang/test/Lower/OpenMP/parallel-reduction-allocatable-array.f90 index 0036670317a8e..41c7d69ebb3ba 100644 --- a/flang/test/Lower/OpenMP/parallel-reduction-allocatable-array.f90 +++ b/flang/test/Lower/OpenMP/parallel-reduction-allocatable-array.f90 @@ -40,7 +40,6 @@ program reduce ! CHECK: %[[VAL_5:.*]] = fir.shape %[[VAL_4]]#1 : (index) -> !fir.shape<1> ! CHECK: %[[VAL_6:.*]] = fir.allocmem !fir.array, %[[VAL_4]]#1 {bindc_name = ".tmp", uniq_name = ""} ! CHECK: %[[VAL_8:.*]]:2 = hlfir.declare %[[VAL_6]](%[[VAL_5]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<1>) -> (!fir.box>, !fir.heap>) -! CHECK: %[[VAL_7:.*]] = arith.constant true ! CHECK: %[[C0:.*]] = arith.constant 0 : index ! CHECK: %[[DIMS:.*]]:3 = fir.box_dims %[[VAL_2]], %[[C0]] : (!fir.box>>, index) -> (index, index, index) ! CHECK: %[[SHIFT:.*]] = fir.shape_shift %[[DIMS]]#0, %[[DIMS]]#1 : (index, index) -> !fir.shapeshift<1> diff --git a/flang/test/Lower/OpenMP/parallel-reduction-array-lb.f90 b/flang/test/Lower/OpenMP/parallel-reduction-array-lb.f90 index ea0aa9ec3f53b..aa91e1e0e8b15 100644 --- a/flang/test/Lower/OpenMP/parallel-reduction-array-lb.f90 +++ b/flang/test/Lower/OpenMP/parallel-reduction-array-lb.f90 @@ -24,7 +24,6 @@ program reduce ! CHECK: %[[VAL_5:.*]] = fir.shape %[[VAL_3]], %[[VAL_4]] : (index, index) -> !fir.shape<2> ! CHECK: %[[VAL_6:.*]] = fir.allocmem !fir.array<3x2xi32> {bindc_name = ".tmp", uniq_name = ""} ! CHECK: %[[VAL_8:.*]]:2 = hlfir.declare %[[VAL_6]](%[[VAL_5]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<2>) -> (!fir.heap>, !fir.heap>) -! CHECK: %[[VAL_7:.*]] = arith.constant true ! CHECK: %[[VAL_9:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_10:.*]]:3 = fir.box_dims %[[VAL_2]], %[[VAL_9]] : (!fir.box>, index) -> (index, index, index) ! CHECK: %[[VAL_11:.*]] = arith.constant 1 : index diff --git a/flang/test/Lower/OpenMP/parallel-reduction-array.f90 b/flang/test/Lower/OpenMP/parallel-reduction-array.f90 index d410714b1573e..59595de338d50 100644 --- a/flang/test/Lower/OpenMP/parallel-reduction-array.f90 +++ b/flang/test/Lower/OpenMP/parallel-reduction-array.f90 @@ -28,7 +28,6 @@ program reduce ! CPU: %[[VAL_5:.*]] = fir.shape %[[VAL_4]] : (index) -> !fir.shape<1> ! CPU: %[[VAL_1:.*]] = fir.allocmem !fir.array<3xi32> {bindc_name = ".tmp", uniq_name = ""} ! CPU: %[[VAL_6:.*]]:2 = hlfir.declare %[[VAL_1]](%[[VAL_5]]) {uniq_name = ".tmp"} : (!fir.heap>, -! CPU: %[[TRUE:.*]] = arith.constant true !fir.shape<1>) -> (!fir.heap>, !fir.heap>) ! CPU: %[[C0:.*]] = arith.constant 0 : index ! CPU: %[[DIMS:.*]]:3 = fir.box_dims %[[VAL_3]], %[[C0]] : (!fir.box>, index) -> (index, index, index) diff --git a/flang/test/Lower/OpenMP/parallel-reduction-array2.f90 b/flang/test/Lower/OpenMP/parallel-reduction-array2.f90 index eb0df2b3a17de..14338c6f50817 100644 --- a/flang/test/Lower/OpenMP/parallel-reduction-array2.f90 +++ b/flang/test/Lower/OpenMP/parallel-reduction-array2.f90 @@ -24,7 +24,6 @@ program reduce ! CHECK: %[[VAL_5:.*]] = fir.shape %[[VAL_4]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_1:.*]] = fir.allocmem !fir.array<3xi32> ! CHECK: %[[VAL_6:.*]]:2 = hlfir.declare %[[VAL_1]](%[[VAL_5]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<1>) -> (!fir.heap>, !fir.heap>) -! CHECK: %[[TRUE:.*]] = arith.constant true ! CHECK: %[[C0:.*]] = arith.constant 0 : index ! CHECK: %[[DIMS:.*]]:3 = fir.box_dims %[[VAL_3]], %[[C0]] : (!fir.box>, index) -> (index, index, index) ! CHECK: %[[SHIFT:.*]] = fir.shape_shift %[[DIMS]]#0, %[[DIMS]]#1 : (index, index) -> !fir.shapeshift<1> diff --git a/flang/test/Lower/OpenMP/parallel-reduction-pointer-array.f90 b/flang/test/Lower/OpenMP/parallel-reduction-pointer-array.f90 index 3c1daa0eb983f..36344458d1cae 100644 --- a/flang/test/Lower/OpenMP/parallel-reduction-pointer-array.f90 +++ b/flang/test/Lower/OpenMP/parallel-reduction-pointer-array.f90 @@ -41,7 +41,6 @@ program reduce ! CHECK: %[[VAL_11:.*]] = fir.shape %[[VAL_10]]#1 : (index) -> !fir.shape<1> ! CHECK: %[[VAL_12:.*]] = fir.allocmem !fir.array, %[[VAL_10]]#1 {bindc_name = ".tmp", uniq_name = ""} ! CHECK: %[[VAL_14:.*]]:2 = hlfir.declare %[[VAL_12]](%[[VAL_11]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<1>) -> (!fir.box>, !fir.heap>) -! CHECK: %[[VAL_13:.*]] = arith.constant true ! CHECK: %[[VAL_15:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_16:.*]]:3 = fir.box_dims %[[VAL_2]], %[[VAL_15]] : (!fir.box>>, index) -> (index, index, index) ! CHECK: %[[VAL_17:.*]] = fir.shape_shift %[[VAL_16]]#0, %[[VAL_16]]#1 : (index, index) -> !fir.shapeshift<1> diff --git a/flang/test/Lower/OpenMP/parallel-reduction3.f90 b/flang/test/Lower/OpenMP/parallel-reduction3.f90 index 69d669a4093fb..9af18378f0ae0 100644 --- a/flang/test/Lower/OpenMP/parallel-reduction3.f90 +++ b/flang/test/Lower/OpenMP/parallel-reduction3.f90 @@ -13,7 +13,6 @@ ! CHECK: %[[VAL_5:.*]] = fir.shape %[[VAL_4]]#1 : (index) -> !fir.shape<1> ! CHECK: %[[VAL_6:.*]] = fir.allocmem !fir.array, %[[VAL_4]]#1 {bindc_name = ".tmp", uniq_name = ""} ! CHECK: %[[VAL_7:.*]]:2 = hlfir.declare %[[VAL_6]](%[[VAL_5]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<1>) -> (!fir.box>, !fir.heap>) -! CHECK: %[[TRUE:.*]] = arith.constant true ! CHECK: %[[C0:.*]] = arith.constant 0 : index ! CHECK: %[[DIMS:.*]]:3 = fir.box_dims %[[VAL_2]], %[[C0]] : (!fir.box>, index) -> (index, index, index) ! CHECK: %[[SHIFT:.*]] = fir.shape_shift %[[DIMS]]#0, %[[DIMS]]#1 : (index, index) -> !fir.shapeshift<1> diff --git a/flang/test/Lower/OpenMP/reduction-array-intrinsic.f90 b/flang/test/Lower/OpenMP/reduction-array-intrinsic.f90 index 104904497745d..8b94d51f986f5 100644 --- a/flang/test/Lower/OpenMP/reduction-array-intrinsic.f90 +++ b/flang/test/Lower/OpenMP/reduction-array-intrinsic.f90 @@ -21,7 +21,6 @@ subroutine max_array_reduction(l, r) ! CHECK: %[[VAL_6:.*]] = fir.shape %[[VAL_5]]#1 : (index) -> !fir.shape<1> ! CHECK: %[[VAL_7:.*]] = fir.allocmem !fir.array, %[[VAL_5]]#1 {bindc_name = ".tmp", uniq_name = ""} ! CHECK: %[[VAL_9:.*]]:2 = hlfir.declare %[[VAL_7]](%[[VAL_6]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<1>) -> (!fir.box>, !fir.heap>) -! CHECK: %[[VAL_8:.*]] = arith.constant true ! CHECK: %[[VAL_10:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_11:.*]]:3 = fir.box_dims %[[VAL_2]], %[[VAL_10]] : (!fir.box>, index) -> (index, index, index) ! CHECK: %[[VAL_12:.*]] = fir.shape_shift %[[VAL_11]]#0, %[[VAL_11]]#1 : (index, index) -> !fir.shapeshift<1> diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-allocatable-array-minmax.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-allocatable-array-minmax.f90 index a02188a7fb0db..2cd953de0dffa 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-allocatable-array-minmax.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-allocatable-array-minmax.f90 @@ -54,7 +54,6 @@ program reduce15 ! CHECK: %[[VAL_11:.*]] = fir.shape %[[VAL_10]]#1 : (index) -> !fir.shape<1> ! CHECK: %[[VAL_12:.*]] = fir.allocmem !fir.array, %[[VAL_10]]#1 {bindc_name = ".tmp", uniq_name = ""} ! CHECK: %[[VAL_14:.*]]:2 = hlfir.declare %[[VAL_12]](%[[VAL_11]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<1>) -> (!fir.box>, !fir.heap>) -! CHECK: %[[VAL_13:.*]] = arith.constant true ! CHECK: %[[VAL_15:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_16:.*]]:3 = fir.box_dims %[[VAL_2]], %[[VAL_15]] : (!fir.box>>, index) -> (index, index, index) ! CHECK: %[[VAL_17:.*]] = fir.shape_shift %[[VAL_16]]#0, %[[VAL_16]]#1 : (index, index) -> !fir.shapeshift<1> @@ -116,7 +115,6 @@ program reduce15 ! CHECK: %[[VAL_11:.*]] = fir.shape %[[VAL_10]]#1 : (index) -> !fir.shape<1> ! CHECK: %[[VAL_12:.*]] = fir.allocmem !fir.array, %[[VAL_10]]#1 {bindc_name = ".tmp", uniq_name = ""} ! CHECK: %[[VAL_14:.*]]:2 = hlfir.declare %[[VAL_12]](%[[VAL_11]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<1>) -> (!fir.box>, !fir.heap>) -! CHECK: %[[VAL_13:.*]] = arith.constant true ! CHECK: %[[VAL_15:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_16:.*]]:3 = fir.box_dims %[[VAL_2]], %[[VAL_15]] : (!fir.box>>, index) -> (index, index, index) ! CHECK: %[[VAL_17:.*]] = fir.shape_shift %[[VAL_16]]#0, %[[VAL_16]]#1 : (index, index) -> !fir.shapeshift<1> diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-array-assumed-shape.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-array-assumed-shape.f90 index d8c5706b912a5..209ee9a4e0cef 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-array-assumed-shape.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-array-assumed-shape.f90 @@ -34,7 +34,6 @@ subroutine reduce(r) ! CHECK: %[[VAL_5:.*]] = fir.shape %[[VAL_4]]#1 : (index) -> !fir.shape<1> ! CHECK: %[[VAL_6:.*]] = fir.allocmem !fir.array, %[[VAL_4]]#1 {bindc_name = ".tmp", uniq_name = ""} ! CHECK: %[[VAL_7:.*]]:2 = hlfir.declare %[[VAL_6]](%[[VAL_5]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<1>) -> (!fir.box>, !fir.heap>) -! CHECK: %[[TRUE:.*]] = arith.constant true ! CHECK: %[[C0:.*]] = arith.constant 0 : index ! CHECK: %[[DIMS:.*]]:3 = fir.box_dims %[[VAL_2]], %[[C0]] : (!fir.box>, index) -> (index, index, index) ! CHECK: %[[SHIFT:.*]] = fir.shape_shift %[[DIMS]]#0, %[[DIMS]]#1 : (index, index) -> !fir.shapeshift<1> diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-array.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-array.f90 index b7882bcbc0d13..afaeba27c5eae 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-array.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-array.f90 @@ -25,7 +25,6 @@ program reduce ! CHECK: %[[VAL_5:.*]] = fir.shape %[[VAL_4]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_1:.*]] = fir.allocmem !fir.array<2xi32> {bindc_name = ".tmp", uniq_name = ""} ! CHECK: %[[VAL_6:.*]]:2 = hlfir.declare %[[VAL_1]](%[[VAL_5]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<1>) -> (!fir.heap>, !fir.heap>) -! CHECK: %[[TRUE:.*]] = arith.constant true ! CHECK: %[[C0:.*]] = arith.constant 0 : index ! CHECK: %[[DIMS:.*]]:3 = fir.box_dims %[[VAL_3]], %[[C0]] : (!fir.box>, index) -> (index, index, index) ! CHECK: %[[SHIFT:.*]] = fir.shape_shift %[[DIMS]]#0, %[[DIMS]]#1 : (index, index) -> !fir.shapeshift<1> diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-array2.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-array2.f90 index 7d90335a13a87..25b2e97a1b7f7 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-array2.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-array2.f90 @@ -25,7 +25,6 @@ program reduce ! CHECK: %[[VAL_5:.*]] = fir.shape %[[VAL_4]] : (index) -> !fir.shape<1> ! CHECK: %[[VAL_1:.*]] = fir.allocmem !fir.array<2xi32> {bindc_name = ".tmp", uniq_name = ""} ! CHECK: %[[VAL_6:.*]]:2 = hlfir.declare %[[VAL_1]](%[[VAL_5]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<1>) -> (!fir.heap>, !fir.heap>) -! CHECK: %[[TRUE:.*]] = arith.constant true ! CHECK: %[[C0:.*]] = arith.constant 0 : index ! CHECK: %[[DIMS:.*]]:3 = fir.box_dims %[[VAL_3]], %[[C0]] : (!fir.box>, index) -> (index, index, index) ! CHECK: %[[SHIFT:.*]] = fir.shape_shift %[[DIMS]]#0, %[[DIMS]]#1 : (index, index) -> !fir.shapeshift<1> diff --git a/flang/test/Lower/OpenMP/wsloop-reduction-multiple-clauses.f90 b/flang/test/Lower/OpenMP/wsloop-reduction-multiple-clauses.f90 index 5133db0347034..edd2bcb1d6be8 100644 --- a/flang/test/Lower/OpenMP/wsloop-reduction-multiple-clauses.f90 +++ b/flang/test/Lower/OpenMP/wsloop-reduction-multiple-clauses.f90 @@ -36,7 +36,6 @@ program main ! CHECK: %[[VAL_6:.*]] = fir.shape %[[VAL_4]], %[[VAL_5]] : (index, index) -> !fir.shape<2> ! CHECK: %[[VAL_7:.*]] = fir.allocmem !fir.array<3x3xf64> {bindc_name = ".tmp", uniq_name = ""} ! CHECK: %[[VAL_9:.*]]:2 = hlfir.declare %[[VAL_7]](%[[VAL_6]]) {uniq_name = ".tmp"} : (!fir.heap>, !fir.shape<2>) -> (!fir.heap>, !fir.heap>) -! CHECK: %[[VAL_8:.*]] = arith.constant true ! CHECK: %[[VAL_10:.*]] = arith.constant 0 : index ! CHECK: %[[VAL_11:.*]]:3 = fir.box_dims %[[VAL_2]], %[[VAL_10]] : (!fir.box>, index) -> (index, index, index) ! CHECK: %[[VAL_12:.*]] = arith.constant 1 : index