[flang-commits] [flang] [flang][NFC] Converted five tests from old lowering to new lowering (part 54) (PR #194774)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Wed Apr 29 18:47:05 PDT 2026


================
@@ -186,31 +199,31 @@ subroutine dynamic_shape_lower_2(cptr, fpr, shape, lower, n)
   integer :: n
   integer :: shape(n)
   integer :: lower(n)
-!CHECK: %[[C_0:.*]] = arith.constant 0 : index
-!CHECK: %[[VAL_2:.*]] = fir.shape %[[C_0]], %[[C_0]] : (index, index) -> !fir.shape<2>
-!CHECK: %[[VAL_3:.*]] = fir.embox %[[ARG1:.*]](%[[VAL_2]]) : (!fir.ptr<!fir.array<?x?xf32>>, !fir.shape<2>) -> !fir.box<!fir.ptr<!fir.array<?x?xf32>>>
-!CHECK: fir.store %[[VAL_3]] to %[[VAL_0:.*]] : !fir.ref<!fir.box<!fir.ptr<!fir.array<?x?xf32>>>>
-!CHECK: %[[VAL_4:.*]] = fir.coordinate_of %[[ARG_0:.*]], __address : (!fir.ref<!fir.type<_QM__fortran_builtinsT__builtin_c_ptr{__address:i64}>>) -> !fir.ref<i64>
-!CHECK: %[[VAL_5:.*]] = fir.load %[[VAL_4]] : !fir.ref<i64>
-!CHECK: %[[VAL_6:.*]] = fir.convert %[[VAL_5]] : (i64) -> !fir.ptr<!fir.array<?x?xf32>>
-!CHECK: %[[C_0:.*]]_0 = arith.constant 0 : index
-!CHECK: %[[VAL_7:.*]] = fir.coordinate_of %[[ARG_2:.*]], %[[C_0]]_0 : (!fir.ref<!fir.array<?xi32>>, index) -> !fir.ref<i32>
-!CHECK: %[[VAL_8:.*]] = fir.load %[[VAL_7]] : !fir.ref<i32>
-!CHECK: %[[VAL_9:.*]] = fir.convert %[[VAL_8]] : (i32) -> index
-!CHECK: %[[C_1:.*]] = arith.constant 1 : index
-!CHECK: %[[VAL_10:.*]] = fir.coordinate_of %[[ARG_2]], %[[C_1]] : (!fir.ref<!fir.array<?xi32>>, index) -> !fir.ref<i32>
-!CHECK: %[[VAL_11:.*]] = fir.load %[[VAL_10]] : !fir.ref<i32>
-!CHECK: %[[VAL_12:.*]] = fir.convert %[[VAL_11]] : (i32) -> index
-!CHECK: %[[C_0:.*]]_1 = arith.constant 0 : index
-!CHECK: %[[VAL_13:.*]] = fir.coordinate_of %[[ARG_3:.*]], %[[C_0]]_1 : (!fir.ref<!fir.array<?xi32>>, index) -> !fir.ref<i32>
-!CHECK: %[[VAL_14:.*]] = fir.load %[[VAL_13]] : !fir.ref<i32>
-!CHECK: %[[VAL_15:.*]] = fir.convert %[[VAL_14]] : (i32) -> index
-!CHECK: %[[C_1:.*]]_2 = arith.constant 1 : index
-!CHECK: %[[VAL_16:.*]] = fir.coordinate_of %[[ARG_3]], %[[C_1]]_2 : (!fir.ref<!fir.array<?xi32>>, index) -> !fir.ref<i32>
-!CHECK: %[[VAL_17:.*]] = fir.load %[[VAL_16]] : !fir.ref<i32>
-!CHECK: %[[VAL_18:.*]] = fir.convert %[[VAL_17]] : (i32) -> index
-!CHECK: %[[VAL_19:.*]] = fir.shape_shift %[[VAL_15]], %[[VAL_9]], %[[VAL_18]], %[[VAL_12]] : (index, index, index, index) -> !fir.shapeshift<2>
-!CHECK: %[[VAL_20:.*]] = fir.embox %[[VAL_6]](%[[VAL_19]]) : (!fir.ptr<!fir.array<?x?xf32>>, !fir.shapeshift<2>)
-!CHECK: fir.store %[[VAL_20]] to %[[VAL_0]] : !fir.ref<!fir.box<!fir.ptr<!fir.array<?x?xf32>>>>
+! CHECK:         %[[FPTR_ALLOCA:.*]] = fir.alloca !fir.box<!fir.ptr<!fir.array<?x?xf32>>>
----------------
eugeneepshteyn wrote:

I decided that I'd rather not change whitespace in this file in this PR, since this will introduce more diffs than necessary. If we really need to change the space to a single space, I can do that as a separate PR.

https://github.com/llvm/llvm-project/pull/194774


More information about the flang-commits mailing list