Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
58 changes: 52 additions & 6 deletions flang/lib/Optimizer/CodeGen/Target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,19 +826,65 @@ struct TargetAArch64 : public GenericTarget<TargetAArch64> {
return marshal;
}

// Flatten a RecordType::TypeList containing more record types or array types
static std::optional<std::vector<mlir::Type>>
flattenTypeList(const RecordType::TypeList &types) {
std::vector<mlir::Type> flatTypes;
// The flat list will be at least the same size as the non-flat list.
flatTypes.reserve(types.size());
for (auto [c, type] : types) {
// Flatten record type
if (auto recTy = mlir::dyn_cast<RecordType>(type)) {
auto subTypeList = flattenTypeList(recTy.getTypeList());
if (!subTypeList)
return std::nullopt;
llvm::copy(*subTypeList, std::back_inserter(flatTypes));
continue;
}

// Flatten array type
if (auto seqTy = mlir::dyn_cast<SequenceType>(type)) {
if (seqTy.hasDynamicExtents())
return std::nullopt;
std::size_t n = seqTy.getConstantArraySize();
auto eleTy = seqTy.getElementType();
// Flatten array of record types
if (auto recTy = mlir::dyn_cast<RecordType>(eleTy)) {
auto subTypeList = flattenTypeList(recTy.getTypeList());
if (!subTypeList)
return std::nullopt;
for (std::size_t i = 0; i < n; ++i)
llvm::copy(*subTypeList, std::back_inserter(flatTypes));
} else {
std::fill_n(std::back_inserter(flatTypes),
seqTy.getConstantArraySize(), eleTy);
}
continue;
}

// Other types are already flat
flatTypes.push_back(type);
}
return flatTypes;
}

// Determine if the type is a Homogenous Floating-point Aggregate (HFA). An
// HFA is a record type with up to 4 floating-point members of the same type.
static bool isHFA(fir::RecordType ty) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is HFA? Please document.

Copy link
Contributor

Choose a reason for hiding this comment

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

@DavidTruby I think you missed this when responding to feedback

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I commented on the wrong one here. I meant the "expand auto" nit below.

auto types = ty.getTypeList();
if (types.empty() || types.size() > 4) {
RecordType::TypeList types = ty.getTypeList();
if (types.empty() || types.size() > 4)
return false;

std::optional<std::vector<mlir::Type>> flatTypes = flattenTypeList(types);
if (!flatTypes || flatTypes->size() > 4) {
return false;
}

if (!isa_real(types.front().second)) {
if (!isa_real(flatTypes->front())) {
return false;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Derived types containing small fp arrays will be rejected here, is the following C struct an HFA? :

typedef struct {
    float x[2];
    float y;
} S;

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah. It is, yes. As is:

typedef struct {
  float x;
  float y;
} S1;

typedef struct {
  S1 s;
  float z;
} S2;

Good spot.


return llvm::all_equal(llvm::make_second_range(types));
return llvm::all_equal(*flatTypes);
}

// AArch64 procedure call ABI:
Expand All @@ -848,8 +894,8 @@ struct TargetAArch64 : public GenericTarget<TargetAArch64> {
CodeGenSpecifics::Marshalling marshal;

if (isHFA(ty)) {
auto newTy = fir::SequenceType::get({ty.getNumFields()}, ty.getType(0));
marshal.emplace_back(newTy, AT{});
// Just return the existing record type
marshal.emplace_back(ty, AT{});
return marshal;
}

Expand Down
123 changes: 98 additions & 25 deletions flang/test/Fir/struct-return-aarch64.fir
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ func.func @test_call_composite(%arg0 : !fir.ref<!composite>) {
}

!hfa_f16 = !fir.type<t2{x:f16, y:f16}>
// CHECK-LABEL: func.func private @test_hfa_f16() -> !fir.array<2xf16>
// CHECK-LABEL: func.func private @test_hfa_f16() -> !fir.type<t2{x:f16,y:f16}>
func.func private @test_hfa_f16() -> !hfa_f16
// CHECK-LABEL: func.func @test_call_hfa_f16(
// CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.type<t2{x:f16,y:f16}>>) {
func.func @test_call_hfa_f16(%arg0 : !fir.ref<!hfa_f16>) {
// CHECK: %[[OUT:.*]] = fir.call @test_hfa_f16() : () -> !fir.array<2xf16>
// CHECK: %[[OUT:.*]] = fir.call @test_hfa_f16() : () -> !fir.type<t2{x:f16,y:f16}>
// CHECK: %[[STACK:.*]] = llvm.intr.stacksave : !llvm.ptr
// CHECK: %[[ARR:.*]] = fir.alloca !fir.array<2xf16>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.array<2xf16>>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.array<2xf16>>) -> !fir.ref<!fir.type<t2{x:f16,y:f16}>>
// CHECK: %[[ARR:.*]] = fir.alloca !fir.type<t2{x:f16,y:f16}>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.type<t2{x:f16,y:f16}>>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.type<t2{x:f16,y:f16}>>) -> !fir.ref<!fir.type<t2{x:f16,y:f16}>>
// CHECK: %[[LD:.*]] = fir.load %[[CVT]] : !fir.ref<!fir.type<t2{x:f16,y:f16}>>
// CHECK: llvm.intr.stackrestore %[[STACK]] : !llvm.ptr
%out = fir.call @test_hfa_f16() : () -> !hfa_f16
Expand All @@ -41,16 +41,16 @@ func.func @test_call_hfa_f16(%arg0 : !fir.ref<!hfa_f16>) {
}

!hfa_f32 = !fir.type<t3{w:f32, x:f32, y:f32, z:f32}>
// CHECK-LABEL: func.func private @test_hfa_f32() -> !fir.array<4xf32>
// CHECK-LABEL: func.func private @test_hfa_f32() -> !fir.type<t3{w:f32,x:f32,y:f32,z:f32}>
func.func private @test_hfa_f32() -> !hfa_f32
// CHECK-LABEL: func.func @test_call_hfa_f32(
// CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.type<t3{w:f32,x:f32,y:f32,z:f32}>>) {
func.func @test_call_hfa_f32(%arg0 : !fir.ref<!hfa_f32>) {
// CHECK: %[[OUT:.*]] = fir.call @test_hfa_f32() : () -> !fir.array<4xf32>
// CHECK: %[[OUT:.*]] = fir.call @test_hfa_f32() : () -> !fir.type<t3{w:f32,x:f32,y:f32,z:f32}>
// CHECK: %[[STACK:.*]] = llvm.intr.stacksave : !llvm.ptr
// CHECK: %[[ARR:.*]] = fir.alloca !fir.array<4xf32>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.array<4xf32>>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.array<4xf32>>) -> !fir.ref<!fir.type<t3{w:f32,x:f32,y:f32,z:f32}>>
// CHECK: %[[ARR:.*]] = fir.alloca !fir.type<t3{w:f32,x:f32,y:f32,z:f32}>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.type<t3{w:f32,x:f32,y:f32,z:f32}>>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.type<t3{w:f32,x:f32,y:f32,z:f32}>>) -> !fir.ref<!fir.type<t3{w:f32,x:f32,y:f32,z:f32}>>
// CHECK: %[[LD:.*]] = fir.load %[[CVT]] : !fir.ref<!fir.type<t3{w:f32,x:f32,y:f32,z:f32}>>
// CHECK: llvm.intr.stackrestore %[[STACK]] : !llvm.ptr
%out = fir.call @test_hfa_f32() : () -> !hfa_f32
Expand All @@ -60,16 +60,16 @@ func.func @test_call_hfa_f32(%arg0 : !fir.ref<!hfa_f32>) {
}

!hfa_f64 = !fir.type<t4{x:f64, y:f64, z:f64}>
// CHECK-LABEL: func.func private @test_hfa_f64() -> !fir.array<3xf64>
// CHECK-LABEL: func.func private @test_hfa_f64() -> !fir.type<t4{x:f64,y:f64,z:f64}>
func.func private @test_hfa_f64() -> !hfa_f64
// CHECK-LABEL: func.func @test_call_hfa_f64(
// CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.type<t4{x:f64,y:f64,z:f64}>>)
func.func @test_call_hfa_f64(%arg0 : !fir.ref<!hfa_f64>) {
// CHECK: %[[OUT:.*]] = fir.call @test_hfa_f64() : () -> !fir.array<3xf64>
// CHECK: %[[OUT:.*]] = fir.call @test_hfa_f64() : () -> !fir.type<t4{x:f64,y:f64,z:f64}>
// CHECK: %[[STACK:.*]] = llvm.intr.stacksave : !llvm.ptr
// CHECK: %[[ARR:.*]] = fir.alloca !fir.array<3xf64>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.array<3xf64>>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.array<3xf64>>) -> !fir.ref<!fir.type<t4{x:f64,y:f64,z:f64}>>
// CHECK: %[[ARR:.*]] = fir.alloca !fir.type<t4{x:f64,y:f64,z:f64}>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.type<t4{x:f64,y:f64,z:f64}>>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.type<t4{x:f64,y:f64,z:f64}>>) -> !fir.ref<!fir.type<t4{x:f64,y:f64,z:f64}>>
// CHECK: %[[LD:.*]] = fir.load %[[CVT]] : !fir.ref<!fir.type<t4{x:f64,y:f64,z:f64}>>
// CHECK: llvm.intr.stackrestore %[[STACK]] : !llvm.ptr
%out = fir.call @test_hfa_f64() : () -> !hfa_f64
Expand All @@ -79,16 +79,16 @@ func.func @test_call_hfa_f64(%arg0 : !fir.ref<!hfa_f64>) {
}

!hfa_f128 = !fir.type<t5{w:f128, x:f128, y:f128, z:f128}>
// CHECK-LABEL: func.func private @test_hfa_f128() -> !fir.array<4xf128>
// CHECK-LABEL: func.func private @test_hfa_f128() -> !fir.type<t5{w:f128,x:f128,y:f128,z:f128}>
func.func private @test_hfa_f128() -> !hfa_f128
// CHECK-LABEL: func.func @test_call_hfa_f128(
// CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.type<t5{w:f128,x:f128,y:f128,z:f128}>>) {
func.func @test_call_hfa_f128(%arg0 : !fir.ref<!hfa_f128>) {
// CHECK: %[[OUT:.*]] = fir.call @test_hfa_f128() : () -> !fir.array<4xf128>
// CHECK: %[[OUT:.*]] = fir.call @test_hfa_f128() : () -> !fir.type<t5{w:f128,x:f128,y:f128,z:f128}>
// CHECK: %[[STACK:.*]] = llvm.intr.stacksave : !llvm.ptr
// CHECK: %[[ARR:.*]] = fir.alloca !fir.array<4xf128>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.array<4xf128>>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.array<4xf128>>) -> !fir.ref<!fir.type<t5{w:f128,x:f128,y:f128,z:f128}>>
// CHECK: %[[ARR:.*]] = fir.alloca !fir.type<t5{w:f128,x:f128,y:f128,z:f128}>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.type<t5{w:f128,x:f128,y:f128,z:f128}>>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.type<t5{w:f128,x:f128,y:f128,z:f128}>>) -> !fir.ref<!fir.type<t5{w:f128,x:f128,y:f128,z:f128}>>
// CHECK: %[[LD:.*]] = fir.load %[[CVT]] : !fir.ref<!fir.type<t5{w:f128,x:f128,y:f128,z:f128}>>
// CHECK: llvm.intr.stackrestore %[[STACK]] : !llvm.ptr
%out = fir.call @test_hfa_f128() : () -> !hfa_f128
Expand All @@ -98,16 +98,16 @@ func.func @test_call_hfa_f128(%arg0 : !fir.ref<!hfa_f128>) {
}

!hfa_bf16 = !fir.type<t6{w:bf16, x:bf16, y:bf16, z:bf16}>
// CHECK-LABEL: func.func private @test_hfa_bf16() -> !fir.array<4xbf16>
// CHECK-LABEL: func.func private @test_hfa_bf16() -> !fir.type<t6{w:bf16,x:bf16,y:bf16,z:bf16}>
func.func private @test_hfa_bf16() -> !hfa_bf16
// CHECK-LABEL: func.func @test_call_hfa_bf16(
// CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.type<t6{w:bf16,x:bf16,y:bf16,z:bf16}>>) {
func.func @test_call_hfa_bf16(%arg0 : !fir.ref<!hfa_bf16>) {
// CHECK: %[[OUT:.*]] = fir.call @test_hfa_bf16() : () -> !fir.array<4xbf16>
// CHECK: %[[OUT:.*]] = fir.call @test_hfa_bf16() : () -> !fir.type<t6{w:bf16,x:bf16,y:bf16,z:bf16}>
// CHECK: %[[STACK:.*]] = llvm.intr.stacksave : !llvm.ptr
// CHECK: %[[ARR:.*]] = fir.alloca !fir.array<4xbf16>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.array<4xbf16>>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.array<4xbf16>>) -> !fir.ref<!fir.type<t6{w:bf16,x:bf16,y:bf16,z:bf16}>>
// CHECK: %[[ARR:.*]] = fir.alloca !fir.type<t6{w:bf16,x:bf16,y:bf16,z:bf16}>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.type<t6{w:bf16,x:bf16,y:bf16,z:bf16}>>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.type<t6{w:bf16,x:bf16,y:bf16,z:bf16}>>) -> !fir.ref<!fir.type<t6{w:bf16,x:bf16,y:bf16,z:bf16}>>
// CHECK: %[[LD:.*]] = fir.load %[[CVT]] : !fir.ref<!fir.type<t6{w:bf16,x:bf16,y:bf16,z:bf16}>>
// CHECK: llvm.intr.stackrestore %[[STACK]] : !llvm.ptr
%out = fir.call @test_hfa_bf16() : () -> !hfa_bf16
Expand Down Expand Up @@ -154,3 +154,76 @@ func.func @test_call_too_big_hfa(%arg0 : !fir.ref<!too_big_hfa>) {
fir.store %out to %arg0 : !fir.ref<!too_big_hfa>
return
}

!nested_hfa_first = !fir.type<t9{s:!hfa_f16,c:f16}>
// CHECK-LABEL: func.func private @test_nested_hfa_first() -> !fir.type<t9{s:!fir.type<t2{x:f16,y:f16}>,c:f16}>
func.func private @test_nested_hfa_first() -> !nested_hfa_first
// CHECK-LABEL: func.func @test_call_nested_hfa_first(%arg0: !fir.ref<!fir.type<t9{s:!fir.type<t2{x:f16,y:f16}>,c:f16}>>) {
func.func @test_call_nested_hfa_first(%arg0 : !fir.ref<!nested_hfa_first>) {
%out = fir.call @test_nested_hfa_first() : () -> !nested_hfa_first
// CHECK: %[[OUT:.*]] = fir.call @test_nested_hfa_first() : () -> !fir.type<t9{s:!fir.type<t2{x:f16,y:f16}>,c:f16}>
// CHECK: %[[STACK:.*]] = llvm.intr.stacksave : !llvm.ptr
// CHECK: %[[ARR:.*]] = fir.alloca !fir.type<t9{s:!fir.type<t2{x:f16,y:f16}>,c:f16}>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.type<t9{s:!fir.type<t2{x:f16,y:f16}>,c:f16}>>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.type<t9{s:!fir.type<t2{x:f16,y:f16}>,c:f16}>>
// CHECK: %[[LD:.*]] = fir.load %[[CVT]] : !fir.ref<!fir.type<t9{s:!fir.type<t2{x:f16,y:f16}>,c:f16}>>
// CHECK: llvm.intr.stackrestore %[[STACK]] : !llvm.ptr
fir.store %out to %arg0 : !fir.ref<!nested_hfa_first>
// CHECK fir.store %[[LD]] to %[[ARG0]] : !fir.ref<!fir.type<t9{s:!fir.type<t2{x:f16,y:f16}>,c:f16}>>
return
}


!nested_hfa_middle = !fir.type<t10{a:f16,s:!hfa_f16,c:f16}>
// CHECK-LABEL: func.func private @test_nested_hfa_middle() -> !fir.type<t10{a:f16,s:!fir.type<t2{x:f16,y:f16}>,c:f16}>
func.func private @test_nested_hfa_middle() -> !nested_hfa_middle
// CHECK-LABEL: func.func @test_call_nested_hfa_middle(%arg0: !fir.ref<!fir.type<t10{a:f16,s:!fir.type<t2{x:f16,y:f16}>,c:f16}>>) {
func.func @test_call_nested_hfa_middle(%arg0 : !fir.ref<!nested_hfa_middle>) {
%out = fir.call @test_nested_hfa_middle() : () -> !nested_hfa_middle
// CHECK: %[[OUT:.*]] = fir.call @test_nested_hfa_middle() : () -> !fir.type<t10{a:f16,s:!fir.type<t2{x:f16,y:f16}>,c:f16}>
// CHECK: %[[STACK:.*]] = llvm.intr.stacksave : !llvm.ptr
// CHECK: %[[ARR:.*]] = fir.alloca !fir.type<t10{a:f16,s:!fir.type<t2{x:f16,y:f16}>,c:f16}>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.type<t10{a:f16,s:!fir.type<t2{x:f16,y:f16}>,c:f16}>>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.type<t10{a:f16,s:!fir.type<t2{x:f16,y:f16}>,c:f16}>>
// CHECK: %[[LD:.*]] = fir.load %[[CVT]] : !fir.ref<!fir.type<t10{a:f16,s:!fir.type<t2{x:f16,y:f16}>,c:f16}>>
// CHECK: llvm.intr.stackrestore %[[STACK]] : !llvm.ptr
fir.store %out to %arg0 : !fir.ref<!nested_hfa_middle>
// CHECK fir.store %[[LD]] to %[[ARG0]] : !fir.ref<!fir.type<t10{a:f16,s:!fir.type<t2{x:f16,y:f16}>,c:f16}>>
return
}

!nested_hfa_end = !fir.type<t11{a:f16,s:!hfa_f16}>
// CHECK-LABEL: func.func private @test_nested_hfa_end() -> !fir.type<t11{a:f16,s:!fir.type<t2{x:f16,y:f16}>}>
func.func private @test_nested_hfa_end() -> !nested_hfa_end
// CHECK-LABEL: func.func @test_call_nested_hfa_end(%arg0: !fir.ref<!fir.type<t11{a:f16,s:!fir.type<t2{x:f16,y:f16}>}>>) {
func.func @test_call_nested_hfa_end(%arg0 : !fir.ref<!nested_hfa_end>) {
%out = fir.call @test_nested_hfa_end() : () -> !nested_hfa_end
// CHECK: %[[OUT:.*]] = fir.call @test_nested_hfa_end() : () -> !fir.type<t11{a:f16,s:!fir.type<t2{x:f16,y:f16}>}>
// CHECK: %[[STACK:.*]] = llvm.intr.stacksave : !llvm.ptr
// CHECK: %[[ARR:.*]] = fir.alloca !fir.type<t11{a:f16,s:!fir.type<t2{x:f16,y:f16}>}>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.type<t11{a:f16,s:!fir.type<t2{x:f16,y:f16}>}>>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.type<t11{a:f16,s:!fir.type<t2{x:f16,y:f16}>}>>
// CHECK: %[[LD:.*]] = fir.load %[[CVT]] : !fir.ref<!fir.type<t11{a:f16,s:!fir.type<t2{x:f16,y:f16}>}>>
// CHECK: llvm.intr.stackrestore %[[STACK]] : !llvm.ptr
fir.store %out to %arg0 : !fir.ref<!nested_hfa_end>
// CHECK fir.store %[[LD]] to %[[ARG0]] : !fir.ref<!fir.type<t11{a:f16,s:!fir.type<t2{x:f16,y:f16}>}>>
return
}

!nested_hfa_array = !fir.type<t12{a:!fir.array<2xf32>,b:f32}>
// CHECK-LABEL: func.func private @test_nested_hfa_array() -> !fir.type<t12{a:!fir.array<2xf32>,b:f32}>
func.func private @test_nested_hfa_array() -> !nested_hfa_array
// CHECK-LABEL: func.func @test_call_nested_hfa_array(%arg0: !fir.ref<!fir.type<t12{a:!fir.array<2xf32>,b:f32}>
func.func @test_call_nested_hfa_array(%arg0 : !fir.ref<!nested_hfa_array>) {
%out = fir.call @test_nested_hfa_array() : () -> !nested_hfa_array
// CHECK: %[[OUT:.*]] = fir.call @test_nested_hfa_array() : () -> !fir.type<t12{a:!fir.array<2xf32>,b:f32}>
// CHECK: %[[STACK:.*]] = llvm.intr.stacksave : !llvm.ptr
// CHECK: %[[ARR:.*]] = fir.alloca !fir.type<t12{a:!fir.array<2xf32>,b:f32}>
// CHECK: fir.store %[[OUT]] to %[[ARR]] : !fir.ref<!fir.type<t12{a:!fir.array<2xf32>,b:f32}>
// CHECK: %[[CVT:.*]] = fir.convert %[[ARR]] : (!fir.ref<!fir.type<t12{a:!fir.array<2xf32>,b:f32}>
// CHECK: %[[LD:.*]] = fir.load %[[CVT]] : !fir.ref<!fir.type<t12{a:!fir.array<2xf32>,b:f32}>
// CHECK: llvm.intr.stackrestore %[[STACK]] : !llvm.ptr
fir.store %out to %arg0 : !fir.ref<!nested_hfa_array>
// CHECK fir.store %[[LD]] to %[[ARG0]] : !fir.ref<!fir.type<t12{a:!fir.array<2xf32>,b:f32}>
return
}
Loading