[clang] [CIR] Flatten unions passed Direct in CallConvLowering (PR #241201)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 11 02:37:23 PST 2026
https://github.com/skc7 created https://github.com/llvm/llvm-project/pull/241201
Summary:
- On AMDGPU, a union wider than 64 bits is passed Direct with no coerce type.
- OGCG passes it as its LLVM type's fields, storage member and tail padding while CIR passed whole union.
Example:
` typedef union { int a[3]; double d; } u_pad_t;`
` void arg_u_pad(u_pad_t u) {}`
` OGCG: @arg_u_pad(double, [8 x i8])`
` CIR: @arg_u_pad(%union.u_pad_t)`
- This patch flattens such a union the same way. Returns stay the union, as in OGCG.
Relates to: https://github.com/llvm/llvm-project/issues/220471
Assisted by: claude opus 5.5
>From f90f026763226850c2a220606bdd0b764bfb46c2 Mon Sep 17 00:00:00 2001
From: skc7 <Krishna.Sankisa at amd.com>
Date: Wed, 11 Nov 2026 15:49:38 +0530
Subject: [PATCH] [CIR] Flatten unions passed Direct in CallConvLowering
---
.../Dialect/Transforms/CIRABIClassifier.cpp | 14 ++-
.../TargetLowering/CIRABIRewriteContext.cpp | 43 +++++--
.../Transforms/abi-lowering/amdgpu-union.cir | 114 ++++++++++++++++++
3 files changed, 153 insertions(+), 18 deletions(-)
create mode 100644 clang/test/CIR/Transforms/abi-lowering/amdgpu-union.cir
diff --git a/clang/lib/CIR/Dialect/Transforms/CIRABIClassifier.cpp b/clang/lib/CIR/Dialect/Transforms/CIRABIClassifier.cpp
index 2855b5fbe349c..1624fa435aa85 100644
--- a/clang/lib/CIR/Dialect/Transforms/CIRABIClassifier.cpp
+++ b/clang/lib/CIR/Dialect/Transforms/CIRABIClassifier.cpp
@@ -571,10 +571,12 @@ convertDirectArgInfo(const llvm::abi::ArgInfo &info, MLIRContext *ctx,
const llvm::abi::Type *coercedAbiTy = info.getCoerceToType();
if (!coercedAbiTy) {
- // A struct the classifier allows to be flattened is coerced to its own
- // type, so that its fields are passed as separate arguments.
+ // A record the classifier allows to be flattened is coerced to its own
+ // type, so that its fields are passed as separate arguments. A union is
+ // flattened as its LLVM type, the storage member and the tail padding.
auto recTy = dyn_cast<cir::RecordType>(origTy);
- if (recTy && recTy.isStruct() && info.getCanBeFlattened())
+ if (recTy && (recTy.isStruct() || recTy.isUnion()) &&
+ info.getCanBeFlattened())
return passCoerced(recTy, /*offset=*/0);
return passUnchanged();
}
@@ -759,9 +761,11 @@ CIRABIClassifierCommon::classifySignature(
return mlir::failure();
}
// The classifier passes a transparent union as its first member, and
- // names no coerce type when it passes that member as its own type.
+ // names no coerce type when it passes that member as its own type. The
+ // union is then left unchanged or coerced to itself above.
auto recTy = dyn_cast<cir::RecordType>(origArg);
- if (ac->kind == ArgKind::Direct && !ac->coercedType && recTy &&
+ if (ac->kind == ArgKind::Direct && recTy &&
+ (!ac->coercedType || ac->coercedType == recTy) &&
recordIsTransparentUnion(modOp, recTy))
ac->coercedType = recTy.getMembers().front();
ac->neededIntRegs = argInfo.getNeededIntRegs();
diff --git a/clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp b/clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
index 9425df3f8e058..8966961763547 100644
--- a/clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
+++ b/clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
@@ -85,6 +85,20 @@ cir::PointerType getIndirectPtrTy(mlir::Type pointee,
return getPtrTyInAddrSpace(pointee, ac.indirectAddrSpace);
}
+/// The struct a union is flattened as: its storage member, then its tail
+/// padding if it has any. This matches the union's LLVM type.
+cir::StructType getUnionFlattenType(cir::UnionType unionTy,
+ const mlir::DataLayout &dl) {
+ SmallVector<mlir::Type, 2> fields;
+ if (mlir::Type storage = unionTy.getUnionStorageType(dl))
+ fields.push_back(storage);
+ if (mlir::Type padding = unionTy.getPadding())
+ fields.push_back(padding);
+ return cir::StructType::get(unionTy.getContext(), fields, unionTy.getPacked(),
+ /*is_class=*/false,
+ cir::RecordType::getAllDataKinds(fields));
+}
+
/// Return the coerced RecordType for a Direct classification that should be
/// flattened into individual scalar arguments, or a null type if the
/// classification does not call for flattening.
@@ -92,14 +106,18 @@ cir::PointerType getIndirectPtrTy(mlir::Type pointee,
/// Flattening applies when all four conditions hold:
/// 1. The classification is Direct with a non-null coercedType.
/// 2. canFlatten is set.
-/// 3. The coercedType is a struct (not a union).
+/// 3. The coercedType is a struct, or a union, which is flattened as the
+/// struct getUnionFlattenType returns.
/// 4. The struct has more than one field (single-field structs are already
/// scalar; flattening them produces no benefit and classic CodeGen skips
/// them for the same reason).
-cir::RecordType getFlattenedCoercedType(const ArgClassification &ac) {
+cir::RecordType getFlattenedCoercedType(const ArgClassification &ac,
+ const mlir::DataLayout &dl) {
if (ac.kind != ArgKind::Direct || !ac.coercedType || !ac.canFlatten)
return {};
auto recTy = dyn_cast<cir::RecordType>(ac.coercedType);
+ if (auto unionTy = dyn_cast_if_present<cir::UnionType>(recTy))
+ recTy = getUnionFlattenType(unionTy, dl);
if (!recTy || !recTy.isStruct() || recTy.getNumElements() <= 1)
return {};
return recTy;
@@ -121,11 +139,10 @@ bool isRecordExtend(const ArgClassification &ac, mlir::Type origTy) {
/// (struct flattening) arguments.
/// The sret return pointer, when present, is prepended by
/// rewriteFunctionDefinition rather than here.
-mlir::LogicalResult
-buildNewArgTypes(ArrayRef<mlir::Type> oldArgTypes,
- const FunctionClassification &fc,
- SmallVectorImpl<mlir::Type> &newArgTypes,
- function_ref<mlir::InFlightDiagnostic()> emitError) {
+mlir::LogicalResult buildNewArgTypes(
+ ArrayRef<mlir::Type> oldArgTypes, const FunctionClassification &fc,
+ SmallVectorImpl<mlir::Type> &newArgTypes, const mlir::DataLayout &dl,
+ function_ref<mlir::InFlightDiagnostic()> emitError) {
assert(newArgTypes.empty() && "expected an empty output vector");
newArgTypes.reserve(oldArgTypes.size());
for (auto [idx, ac] : llvm::enumerate(fc.argInfos)) {
@@ -136,7 +153,7 @@ buildNewArgTypes(ArrayRef<mlir::Type> oldArgTypes,
// per field of the coerced struct rather than the struct itself.
// Single-field coerced structs fall through to the non-flatten path —
// the struct is already scalar-sized and flattening adds no value.
- if (cir::RecordType flatTy = getFlattenedCoercedType(ac)) {
+ if (cir::RecordType flatTy = getFlattenedCoercedType(ac, dl)) {
llvm::append_range(newArgTypes, flatTy.getMembers());
} else {
// Direct with a coerced type: the lowered signature uses the coerced
@@ -292,7 +309,7 @@ mlir::ArrayAttr updateArgAttrs(mlir::MLIRContext *ctx, mlir::ModuleOp module,
builder.getI64IntegerAttr(ac.directAlign->value()));
existing = attrs.getDictionary(ctx);
}
- if (cir::RecordType flatTy = getFlattenedCoercedType(ac)) {
+ if (cir::RecordType flatTy = getFlattenedCoercedType(ac, dl)) {
// Direct + canFlatten: as in classic CodeGen, each flattened field
// carries the attributes of the argument it came from.
newArgAttrs.append(flatTy.getNumElements(), existing);
@@ -1251,7 +1268,7 @@ insertArgCoercion(mlir::FunctionOpInterface funcOp,
mlir::BlockArgument blockArg = entry.getArgument(blockArgIdx);
- if (cir::RecordType flatTy = getFlattenedCoercedType(ac)) {
+ if (cir::RecordType flatTy = getFlattenedCoercedType(ac, dl)) {
// Direct + canFlatten: the coerced type is a struct whose fields are
// passed as separate arguments. As in the Expand path, the single block
// arg becomes N scalar block args, and each is stored straight into a
@@ -1949,7 +1966,7 @@ mlir::LogicalResult CIRABIRewriteContext::rewriteFunctionDefinition(
"CIR functions return zero or one value");
SmallVector<mlir::Type> newArgTypes;
- if (mlir::failed(buildNewArgTypes(oldArgTypes, fc, newArgTypes,
+ if (mlir::failed(buildNewArgTypes(oldArgTypes, fc, newArgTypes, dl,
[&]() { return funcOp.emitOpError(); })))
return mlir::failure();
@@ -2030,7 +2047,7 @@ mlir::LogicalResult CIRABIRewriteContext::rewriteFunctionDefinition(
entry.eraseArgument(blockArgIdx);
continue;
}
- if (cir::RecordType flatTy = getFlattenedCoercedType(ac))
+ if (cir::RecordType flatTy = getFlattenedCoercedType(ac, dl))
blockArgIdx += flatTy.getNumElements();
else if (ac.kind == ArgKind::Expand)
blockArgIdx += cast<cir::RecordType>(oldArgTypes[i]).getNumElements();
@@ -2171,7 +2188,7 @@ CIRABIRewriteContext::rewriteCallSite(mlir::Operation *callOp,
if (ac.kind == ArgKind::Ignore)
continue;
mlir::Value arg = argOperands[idx];
- if (cir::RecordType flatTy = getFlattenedCoercedType(ac)) {
+ if (cir::RecordType flatTy = getFlattenedCoercedType(ac, dl)) {
// Direct + canFlatten: pass one scalar call argument per field of the
// ABI-coerced struct. A non-atomic record load is read in place or
// through a copy of its storage, as emitCoercedRecordLoad decides, and
diff --git a/clang/test/CIR/Transforms/abi-lowering/amdgpu-union.cir b/clang/test/CIR/Transforms/abi-lowering/amdgpu-union.cir
new file mode 100644
index 0000000000000..c992447e1aece
--- /dev/null
+++ b/clang/test/CIR/Transforms/abi-lowering/amdgpu-union.cir
@@ -0,0 +1,114 @@
+// RUN: cir-opt %s -cir-call-conv-lowering=target=amdgpu | FileCheck %s
+
+// A union wider than 64 bits is passed Direct with no coerce type. The
+// argument is passed as the union's LLVM type, its storage member and then its
+// tail padding. A return is not flattened and stays the union.
+
+!s32i = !cir.int<s, 32>
+!u8i = !cir.int<u, 8>
+!rec_u_pad_t = !cir.union<"u_pad_t" {data !cir.array<!s32i x 3>, data !cir.double}, padding = {!cir.array<!u8i x 8>}>
+!rec_u_one_t = !cir.union<"u_one_t" {data !cir.float}>
+
+// CHECK: ![[FLAT:rec_anon_struct[0-9]*]] = !cir.struct<{data !cir.double, data !cir.array<!u8i x 8>}>
+
+module attributes {
+ dlti.dl_spec = #dlti.dl_spec<
+ #dlti.dl_entry<i32, dense<32>: vector<2xi64>>,
+ #dlti.dl_entry<i64, dense<64>: vector<2xi64>>,
+ #dlti.dl_entry<f64, dense<64>: vector<2xi64>>,
+ #dlti.dl_entry<"dlti.alloca_memory_space", 5 : ui64>>
+} {
+
+ // The double storage member and the 8 padding bytes are passed separately.
+ cir.func @arg_u_pad(%arg0: !rec_u_pad_t) requires_call_conv_lowering {
+ %0 = cir.alloca "u" align(8) init : !cir.ptr<!rec_u_pad_t, target_address_space(5)>
+ %1 = cir.cast address_space %0 : !cir.ptr<!rec_u_pad_t, target_address_space(5)> -> !cir.ptr<!rec_u_pad_t>
+ cir.store %arg0, %1 : !rec_u_pad_t, !cir.ptr<!rec_u_pad_t>
+ cir.return
+ }
+
+ // CHECK: cir.func @arg_u_pad(%[[STORAGE:[^:]+]]: !cir.double, %[[PAD:[^:]+]]: !cir.array<!u8i x 8>) {
+ // CHECK-NEXT: %[[COERCE:.*]] = cir.alloca "coerce" align(8) : !cir.ptr<![[FLAT]], target_address_space(5)>
+ // CHECK-NEXT: %[[F0:.*]] = cir.get_member %[[COERCE]][0] {name = ""} : !cir.ptr<![[FLAT]], target_address_space(5)> -> !cir.ptr<!cir.double, target_address_space(5)>
+ // CHECK-NEXT: cir.store %[[STORAGE]], %[[F0]] : !cir.double, !cir.ptr<!cir.double, target_address_space(5)>
+ // CHECK-NEXT: %[[F1:.*]] = cir.get_member %[[COERCE]][1] {name = ""} : !cir.ptr<![[FLAT]], target_address_space(5)> -> !cir.ptr<!cir.array<!u8i x 8>, target_address_space(5)>
+ // CHECK-NEXT: cir.store %[[PAD]], %[[F1]] : !cir.array<!u8i x 8>, !cir.ptr<!cir.array<!u8i x 8>, target_address_space(5)>
+ // CHECK-NEXT: %[[AS_UNION:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<![[FLAT]], target_address_space(5)> -> !cir.ptr<!rec_u_pad_t, target_address_space(5)>
+ // CHECK-NEXT: %[[U:.*]] = cir.alloca "u" align(8) init : !cir.ptr<!rec_u_pad_t, target_address_space(5)>
+ // CHECK-NEXT: %[[U_CAST:.*]] = cir.cast address_space %[[U]] : !cir.ptr<!rec_u_pad_t, target_address_space(5)> -> !cir.ptr<!rec_u_pad_t>
+ // CHECK-NEXT: cir.copy %[[AS_UNION]] align(8) to %[[U_CAST]] align(8) : !cir.ptr<!rec_u_pad_t, target_address_space(5)>, !cir.ptr<!rec_u_pad_t>
+ // CHECK-NEXT: cir.return
+
+ // The caller passes the storage member and the padding bytes.
+ cir.func @call_u_pad(%arg0: !rec_u_pad_t) requires_call_conv_lowering {
+ %0 = cir.alloca "u" align(8) init : !cir.ptr<!rec_u_pad_t, target_address_space(5)>
+ %1 = cir.cast address_space %0 : !cir.ptr<!rec_u_pad_t, target_address_space(5)> -> !cir.ptr<!rec_u_pad_t>
+ cir.store %arg0, %1 : !rec_u_pad_t, !cir.ptr<!rec_u_pad_t>
+ %2 = cir.load align(8) %1 : !cir.ptr<!rec_u_pad_t>, !rec_u_pad_t
+ cir.call @arg_u_pad(%2) : (!rec_u_pad_t) -> ()
+ cir.return
+ }
+
+ // CHECK: cir.func @call_u_pad(%[[STORAGE:[^:]+]]: !cir.double, %[[PAD:[^:]+]]: !cir.array<!u8i x 8>) {
+ // CHECK-NEXT: %[[COERCE:.*]] = cir.alloca "coerce" align(8) : !cir.ptr<![[FLAT]], target_address_space(5)>
+ // CHECK-NEXT: %[[F0:.*]] = cir.get_member %[[COERCE]][0] {name = ""} : !cir.ptr<![[FLAT]], target_address_space(5)> -> !cir.ptr<!cir.double, target_address_space(5)>
+ // CHECK-NEXT: cir.store %[[STORAGE]], %[[F0]] : !cir.double, !cir.ptr<!cir.double, target_address_space(5)>
+ // CHECK-NEXT: %[[F1:.*]] = cir.get_member %[[COERCE]][1] {name = ""} : !cir.ptr<![[FLAT]], target_address_space(5)> -> !cir.ptr<!cir.array<!u8i x 8>, target_address_space(5)>
+ // CHECK-NEXT: cir.store %[[PAD]], %[[F1]] : !cir.array<!u8i x 8>, !cir.ptr<!cir.array<!u8i x 8>, target_address_space(5)>
+ // CHECK-NEXT: %[[AS_UNION:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<![[FLAT]], target_address_space(5)> -> !cir.ptr<!rec_u_pad_t, target_address_space(5)>
+ // CHECK-NEXT: %[[U:.*]] = cir.alloca "u" align(8) init : !cir.ptr<!rec_u_pad_t, target_address_space(5)>
+ // CHECK-NEXT: %[[U_CAST:.*]] = cir.cast address_space %[[U]] : !cir.ptr<!rec_u_pad_t, target_address_space(5)> -> !cir.ptr<!rec_u_pad_t>
+ // CHECK-NEXT: cir.copy %[[AS_UNION]] align(8) to %[[U_CAST]] align(8) : !cir.ptr<!rec_u_pad_t, target_address_space(5)>, !cir.ptr<!rec_u_pad_t>
+ // CHECK-NEXT: %[[U_FLAT:.*]] = cir.cast bitcast %[[U_CAST]] : !cir.ptr<!rec_u_pad_t> -> !cir.ptr<![[FLAT]]>
+ // CHECK-NEXT: %[[U_F0:.*]] = cir.get_member %[[U_FLAT]][0] {name = ""} : !cir.ptr<![[FLAT]]> -> !cir.ptr<!cir.double>
+ // CHECK-NEXT: %[[ARG_STORAGE:.*]] = cir.load align(8) %[[U_F0]] : !cir.ptr<!cir.double>, !cir.double
+ // CHECK-NEXT: %[[U_F1:.*]] = cir.get_member %[[U_FLAT]][1] {name = ""} : !cir.ptr<![[FLAT]]> -> !cir.ptr<!cir.array<!u8i x 8>>
+ // CHECK-NEXT: %[[ARG_PAD:.*]] = cir.load align(8) %[[U_F1]] : !cir.ptr<!cir.array<!u8i x 8>>, !cir.array<!u8i x 8>
+ // CHECK-NEXT: cir.call @arg_u_pad(%[[ARG_STORAGE]], %[[ARG_PAD]]) : (!cir.double, !cir.array<!u8i x 8>) -> ()
+ // CHECK-NEXT: cir.return
+
+ // The argument is flattened, but the return stays the union.
+ cir.func @ret_u_pad(%arg0: !rec_u_pad_t) -> !rec_u_pad_t requires_call_conv_lowering {
+ %0 = cir.alloca "__retval" align(8) : !cir.ptr<!rec_u_pad_t, target_address_space(5)>
+ %1 = cir.alloca "u" align(8) init : !cir.ptr<!rec_u_pad_t, target_address_space(5)>
+ %2 = cir.cast address_space %1 : !cir.ptr<!rec_u_pad_t, target_address_space(5)> -> !cir.ptr<!rec_u_pad_t>
+ %3 = cir.cast address_space %0 : !cir.ptr<!rec_u_pad_t, target_address_space(5)> -> !cir.ptr<!rec_u_pad_t>
+ cir.store %arg0, %2 : !rec_u_pad_t, !cir.ptr<!rec_u_pad_t>
+ cir.copy %2 align(8) to %3 align(8) : !cir.ptr<!rec_u_pad_t>
+ %4 = cir.load %0 : !cir.ptr<!rec_u_pad_t, target_address_space(5)>, !rec_u_pad_t
+ cir.return %4 : !rec_u_pad_t
+ }
+
+ // CHECK: cir.func @ret_u_pad(%[[STORAGE:[^:]+]]: !cir.double, %[[PAD:[^:]+]]: !cir.array<!u8i x 8>) -> !rec_u_pad_t {
+ // CHECK-NEXT: %[[COERCE:.*]] = cir.alloca "coerce" align(8) : !cir.ptr<![[FLAT]], target_address_space(5)>
+ // CHECK-NEXT: %[[F0:.*]] = cir.get_member %[[COERCE]][0] {name = ""} : !cir.ptr<![[FLAT]], target_address_space(5)> -> !cir.ptr<!cir.double, target_address_space(5)>
+ // CHECK-NEXT: cir.store %[[STORAGE]], %[[F0]] : !cir.double, !cir.ptr<!cir.double, target_address_space(5)>
+ // CHECK-NEXT: %[[F1:.*]] = cir.get_member %[[COERCE]][1] {name = ""} : !cir.ptr<![[FLAT]], target_address_space(5)> -> !cir.ptr<!cir.array<!u8i x 8>, target_address_space(5)>
+ // CHECK-NEXT: cir.store %[[PAD]], %[[F1]] : !cir.array<!u8i x 8>, !cir.ptr<!cir.array<!u8i x 8>, target_address_space(5)>
+ // CHECK-NEXT: %[[AS_UNION:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<![[FLAT]], target_address_space(5)> -> !cir.ptr<!rec_u_pad_t, target_address_space(5)>
+ // CHECK-NEXT: %[[RETVAL:.*]] = cir.alloca "__retval" align(8) : !cir.ptr<!rec_u_pad_t, target_address_space(5)>
+ // CHECK-NEXT: %[[U:.*]] = cir.alloca "u" align(8) init : !cir.ptr<!rec_u_pad_t, target_address_space(5)>
+ // CHECK-NEXT: %[[U_CAST:.*]] = cir.cast address_space %[[U]] : !cir.ptr<!rec_u_pad_t, target_address_space(5)> -> !cir.ptr<!rec_u_pad_t>
+ // CHECK-NEXT: %[[RETVAL_CAST:.*]] = cir.cast address_space %[[RETVAL]] : !cir.ptr<!rec_u_pad_t, target_address_space(5)> -> !cir.ptr<!rec_u_pad_t>
+ // CHECK-NEXT: cir.copy %[[AS_UNION]] align(8) to %[[U_CAST]] align(8) : !cir.ptr<!rec_u_pad_t, target_address_space(5)>, !cir.ptr<!rec_u_pad_t>
+ // CHECK-NEXT: cir.copy %[[U_CAST]] align(8) to %[[RETVAL_CAST]] align(8) : !cir.ptr<!rec_u_pad_t>
+ // CHECK-NEXT: %[[RET:.*]] = cir.load %[[RETVAL]] : !cir.ptr<!rec_u_pad_t, target_address_space(5)>, !rec_u_pad_t
+ // CHECK-NEXT: cir.return %[[RET]] : !rec_u_pad_t
+
+ // A union of one member is passed as that member.
+ cir.func @arg_u_one(%arg0: !rec_u_one_t) requires_call_conv_lowering {
+ %0 = cir.alloca "u" align(4) init : !cir.ptr<!rec_u_one_t, target_address_space(5)>
+ %1 = cir.cast address_space %0 : !cir.ptr<!rec_u_one_t, target_address_space(5)> -> !cir.ptr<!rec_u_one_t>
+ cir.store %arg0, %1 : !rec_u_one_t, !cir.ptr<!rec_u_one_t>
+ cir.return
+ }
+
+ // CHECK: cir.func @arg_u_one(%[[ARG:.*]]: !cir.float) {
+ // CHECK-NEXT: %[[COERCE:.*]] = cir.alloca "coerce" align(4) : !cir.ptr<!cir.float, target_address_space(5)>
+ // CHECK-NEXT: cir.store %[[ARG]], %[[COERCE]] : !cir.float, !cir.ptr<!cir.float, target_address_space(5)>
+ // CHECK-NEXT: %[[AS_UNION:.*]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<!cir.float, target_address_space(5)> -> !cir.ptr<!rec_u_one_t, target_address_space(5)>
+ // CHECK-NEXT: %[[U:.*]] = cir.alloca "u" align(4) init : !cir.ptr<!rec_u_one_t, target_address_space(5)>
+ // CHECK-NEXT: %[[U_CAST:.*]] = cir.cast address_space %[[U]] : !cir.ptr<!rec_u_one_t, target_address_space(5)> -> !cir.ptr<!rec_u_one_t>
+ // CHECK-NEXT: cir.copy %[[AS_UNION]] align(4) to %[[U_CAST]] align(4) : !cir.ptr<!rec_u_one_t, target_address_space(5)>, !cir.ptr<!rec_u_one_t>
+ // CHECK-NEXT: cir.return
+}
More information about the cfe-commits
mailing list