diff --git a/flang/lib/Optimizer/Dialect/FIRType.cpp b/flang/lib/Optimizer/Dialect/FIRType.cpp index 1a303c363a288..bc35f9b44e73e 100644 --- a/flang/lib/Optimizer/Dialect/FIRType.cpp +++ b/flang/lib/Optimizer/Dialect/FIRType.cpp @@ -539,7 +539,7 @@ std::string getTypeAsString(mlir::Type ty, const fir::KindMapping &kindMap, } else if (auto seqTy = mlir::dyn_cast_or_null(ty)) { for (auto extent : seqTy.getShape()) { if (extent == fir::SequenceType::getUnknownExtent()) - name << "?x"; + name << "Ux"; else name << extent << 'x'; } diff --git a/flang/test/Lower/OpenACC/acc-private.f90 b/flang/test/Lower/OpenACC/acc-private.f90 index 0f9cfad1043be..6c71a9bc72ff3 100644 --- a/flang/test/Lower/OpenACC/acc-private.f90 +++ b/flang/test/Lower/OpenACC/acc-private.f90 @@ -3,7 +3,7 @@ ! RUN: bbc -fopenacc -emit-fir %s -o - | FileCheck %s --check-prefixes=CHECK,FIR ! RUN: bbc -fopenacc -emit-hlfir %s -o - | FileCheck %s --check-prefixes=CHECK,HLFIR -! CHECK-LABEL: acc.private.recipe @"privatization_box_?xi32" : !fir.box> init { +! CHECK-LABEL: acc.private.recipe @privatization_box_Uxi32 : !fir.box> init { ! CHECK: ^bb0(%[[ARG0:.*]]: !fir.box>): ! HLFIR: %[[C0:.*]] = arith.constant 0 : index ! HLFIR: %[[BOX_DIMS:.*]]:3 = fir.box_dims %[[ARG0]], %[[C0]] : (!fir.box>, index) -> (index, index, index) @@ -194,4 +194,4 @@ subroutine acc_private_assumed_shape(a, n) ! HLFIR: %[[DECL_A:.*]]:2 = hlfir.declare %arg0 {uniq_name = "_QFacc_private_assumed_shapeEa"} : (!fir.box>) -> (!fir.box>, !fir.box>) ! HLFIR: %[[ADDR:.*]] = fir.box_addr %[[DECL_A]]#1 : (!fir.box>) -> !fir.ref> ! HLFIR: %[[PRIVATE:.*]] = acc.private varPtr(%[[ADDR]] : !fir.ref>) bounds(%{{.*}}) -> !fir.ref> {name = "a"} -! HLFIR: acc.parallel private(@"privatization_box_?xi32" -> %[[PRIVATE]] : !fir.ref>) { +! HLFIR: acc.parallel private(@privatization_box_Uxi32 -> %[[PRIVATE]] : !fir.ref>) { diff --git a/flang/test/Lower/OpenACC/acc-reduction.f90 b/flang/test/Lower/OpenACC/acc-reduction.f90 index 381388c29e658..c102991b48632 100644 --- a/flang/test/Lower/OpenACC/acc-reduction.f90 +++ b/flang/test/Lower/OpenACC/acc-reduction.f90 @@ -3,7 +3,7 @@ ! RUN: bbc -fopenacc -emit-fir %s -o - | FileCheck %s --check-prefixes=CHECK,FIR ! RUN: bbc -fopenacc -emit-hlfir %s -o - | FileCheck %s --check-prefixes=CHECK,HLFIR -! CHECK-LABEL: acc.reduction.recipe @"reduction_add_section_lb1.ub3_ref_?xi32" : !fir.box> reduction_operator init { +! CHECK-LABEL: acc.reduction.recipe @reduction_add_section_lb1.ub3_ref_Uxi32 : !fir.box> reduction_operator init { ! CHECK: ^bb0(%[[ARG0:.*]]: !fir.box>): ! HLFIR: %[[BOX_DIMS:.*]]:3 = fir.box_dims %[[ARG0]], %c0{{.*}} : (!fir.box>, index) -> (index, index, index) ! HLFIR: %[[SHAPE:.*]] = fir.shape %[[BOX_DIMS]]#1 : (index) -> !fir.shape<1> @@ -29,7 +29,7 @@ ! HLFIR: acc.yield %[[ARG0]] : !fir.box> ! HLFIR: } -! CHECK-LABEL: acc.reduction.recipe @"reduction_max_ref_?xf32" : !fir.box> reduction_operator init { +! CHECK-LABEL: acc.reduction.recipe @reduction_max_ref_Uxf32 : !fir.box> reduction_operator init { ! CHECK: ^bb0(%[[ARG0:.*]]: !fir.box>): ! CHECK: %[[INIT_VALUE:.*]] = arith.constant -1.401300e-45 : f32 ! HLFIR: %[[C0:.*]] = arith.constant 0 : index @@ -57,7 +57,7 @@ ! CHECK: acc.yield %[[ARG0]] : !fir.box> ! CHECK: } -! CHECK-LABEL: acc.reduction.recipe @"reduction_add_ref_?xi32" : !fir.box> reduction_operator init { +! CHECK-LABEL: acc.reduction.recipe @reduction_add_ref_Uxi32 : !fir.box> reduction_operator init { ! CHECK: ^bb0(%[[ARG0:.*]]: !fir.box>): ! HLFIR: %[[INIT_VALUE:.*]] = arith.constant 0 : i32 ! HLFIR: %[[C0:.*]] = arith.constant 0 : index @@ -1097,7 +1097,7 @@ subroutine acc_reduction_add_dynamic_extent_add(a) ! CHECK-SAME: %[[ARG0:.*]]: !fir.box> {fir.bindc_name = "a"}) ! HLFIR: %[[DECLARG0:.*]]:2 = hlfir.declare %[[ARG0]] ! HLFIR: %[[RED:.*]] = acc.reduction varPtr(%{{.*}} : !fir.ref>) bounds(%{{.*}}) -> !fir.ref> {name = "a"} -! HLFIR: acc.parallel reduction(@"reduction_add_ref_?xi32" -> %[[RED:.*]] : !fir.ref>) +! HLFIR: acc.parallel reduction(@reduction_add_ref_Uxi32 -> %[[RED:.*]] : !fir.ref>) subroutine acc_reduction_add_dynamic_extent_max(a) real :: a(:) @@ -1109,7 +1109,7 @@ subroutine acc_reduction_add_dynamic_extent_max(a) ! CHECK-SAME: %[[ARG0:.*]]: !fir.box> {fir.bindc_name = "a"}) ! HLFIR: %[[DECLARG0:.*]]:2 = hlfir.declare %[[ARG0]] ! HLFIR: %[[RED:.*]] = acc.reduction varPtr(%{{.*}} : !fir.ref>) bounds(%{{.*}}) -> !fir.ref> {name = "a"} -! HLFIR: acc.parallel reduction(@"reduction_max_ref_?xf32" -> %[[RED]] : !fir.ref>) { +! HLFIR: acc.parallel reduction(@reduction_max_ref_Uxf32 -> %[[RED]] : !fir.ref>) { subroutine acc_reduction_add_dynamic_extent_add_with_section(a) integer :: a(:) @@ -1123,4 +1123,4 @@ subroutine acc_reduction_add_dynamic_extent_add_with_section(a) ! HLFIR: %[[BOUND:.*]] = acc.bounds lowerbound(%c1{{.*}} : index) upperbound(%c3{{.*}} : index) stride(%{{.*}}#2 : index) startIdx(%{{.*}} : index) {strideInBytes = true} ! HLFIR: %[[BOX_ADDR:.*]] = fir.box_addr %[[DECL]]#1 : (!fir.box>) -> !fir.ref> ! HLFIR: %[[RED:.*]] = acc.reduction varPtr(%[[BOX_ADDR]] : !fir.ref>) bounds(%[[BOUND]]) -> !fir.ref> {name = "a(2:4)"} -! HLFIR: acc.parallel reduction(@"reduction_add_section_lb1.ub3_ref_?xi32" -> %[[RED]] : !fir.ref>) +! HLFIR: acc.parallel reduction(@reduction_add_section_lb1.ub3_ref_Uxi32 -> %[[RED]] : !fir.ref>) diff --git a/flang/unittests/Optimizer/FIRTypesTest.cpp b/flang/unittests/Optimizer/FIRTypesTest.cpp index 2bde6f556bdc8..b66c1ff441bad 100644 --- a/flang/unittests/Optimizer/FIRTypesTest.cpp +++ b/flang/unittests/Optimizer/FIRTypesTest.cpp @@ -308,7 +308,7 @@ TEST_F(FIRTypesTest, getTypeAsString) { fir::SequenceType::get({fir::SequenceType::getUnknownExtent(), fir::SequenceType::getUnknownExtent()}, ty); - EXPECT_EQ("?x?xi64", fir::getTypeAsString(dynArrTy, *kindMap)); + EXPECT_EQ("UxUxi64", fir::getTypeAsString(dynArrTy, *kindMap)); EXPECT_EQ("llvmptr_i32", fir::getTypeAsString( fir::LLVMPointerType::get(mlir::IntegerType::get(&context, 32)),