Skip to content

Commit c515ad9

Browse files
committed
Reland "Revert "[clang][CGRecordLayout] Remove dependency on isZeroSize (llvm#96422)" (#156)"
This reverts commit e5cb8bd.
1 parent 23df887 commit c515ad9

29 files changed

+270
-171
lines changed

clang/lib/CodeGen/ABIInfoImpl.cpp

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,41 @@ bool CodeGen::isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays,
304304
return true;
305305
}
306306

307+
bool CodeGen::isEmptyFieldForLayout(const ASTContext &Context,
308+
const FieldDecl *FD) {
309+
if (FD->isZeroLengthBitField())
310+
return true;
311+
312+
if (FD->isUnnamedBitField())
313+
return false;
314+
315+
return isEmptyRecordForLayout(Context, FD->getType());
316+
}
317+
318+
bool CodeGen::isEmptyRecordForLayout(const ASTContext &Context, QualType T) {
319+
const RecordType *RT = T->getAs<RecordType>();
320+
if (!RT)
321+
return false;
322+
323+
const RecordDecl *RD = RT->getDecl();
324+
325+
// If this is a C++ record, check the bases first.
326+
if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
327+
if (CXXRD->isDynamicClass())
328+
return false;
329+
330+
for (const auto &I : CXXRD->bases())
331+
if (!isEmptyRecordForLayout(Context, I.getType()))
332+
return false;
333+
}
334+
335+
for (const auto *I : RD->fields())
336+
if (!isEmptyFieldForLayout(Context, I))
337+
return false;
338+
339+
return true;
340+
}
341+
307342
const Type *CodeGen::isSingleElementStruct(QualType T, ASTContext &Context) {
308343
const RecordType *RT = T->getAs<RecordType>();
309344
if (!RT)

clang/lib/CodeGen/ABIInfoImpl.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,16 @@ bool isEmptyField(ASTContext &Context, const FieldDecl *FD, bool AllowArrays,
120120
bool isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays,
121121
bool AsIfNoUniqueAddr = false);
122122

123+
/// isEmptyFieldForLayout - Return true iff the field is "empty", that is,
124+
/// either a zero-width bit-field or an \ref isEmptyRecordForLayout.
125+
bool isEmptyFieldForLayout(const ASTContext &Context, const FieldDecl *FD);
126+
127+
/// isEmptyRecordForLayout - Return true iff a structure contains only empty
128+
/// base classes (per \ref isEmptyRecordForLayout) and fields (per
129+
/// \ref isEmptyFieldForLayout). Note, C++ record fields are considered empty
130+
/// if the [[no_unique_address]] attribute would have made them empty.
131+
bool isEmptyRecordForLayout(const ASTContext &Context, QualType T);
132+
123133
/// isSingleElementStruct - Determine if a structure is a "single
124134
/// element struct", i.e. it has exactly one non-empty field or
125135
/// exactly one field which is itself a single element

clang/lib/CodeGen/CGClass.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#include "ABIInfoImpl.h"
1314
#include "CGBlocks.h"
1415
#include "CGCXXABI.h"
1516
#include "CGDebugInfo.h"
@@ -928,7 +929,7 @@ namespace {
928929
}
929930

930931
void addMemcpyableField(FieldDecl *F) {
931-
if (F->isZeroSize(CGF.getContext()))
932+
if (isEmptyFieldForLayout(CGF.getContext(), F))
932933
return;
933934
if (!FirstField)
934935
addInitialField(F);
@@ -1879,7 +1880,7 @@ namespace {
18791880
const CXXDestructorDecl *DD)
18801881
: Context(Context), EHStack(EHStack), DD(DD), StartIndex(std::nullopt) {}
18811882
void PushCleanupForField(const FieldDecl *Field) {
1882-
if (Field->isZeroSize(Context))
1883+
if (isEmptyFieldForLayout(Context, Field))
18831884
return;
18841885
unsigned FieldIndex = Field->getFieldIndex();
18851886
if (FieldHasTrivialDestructorBody(Context, Field)) {

clang/lib/CodeGen/CGExprConstant.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#include "ABIInfoImpl.h"
1314
#include "CGCXXABI.h"
1415
#include "CGObjCRuntime.h"
1516
#include "CGRecordLayout.h"
@@ -757,7 +758,7 @@ bool ConstStructBuilder::Build(const InitListExpr *ILE, bool AllowOverwrite) {
757758

758759
// Zero-sized fields are not emitted, but their initializers may still
759760
// prevent emission of this struct as a constant.
760-
if (Field->isZeroSize(CGM.getContext())) {
761+
if (isEmptyFieldForLayout(CGM.getContext(), Field)) {
761762
if (Init && Init->HasSideEffects(CGM.getContext()))
762763
return false;
763764
continue;
@@ -893,7 +894,8 @@ bool ConstStructBuilder::Build(const APValue &Val, const RecordDecl *RD,
893894
continue;
894895

895896
// Don't emit anonymous bitfields or zero-sized fields.
896-
if (Field->isUnnamedBitField() || Field->isZeroSize(CGM.getContext()))
897+
if (Field->isUnnamedBitField() ||
898+
isEmptyFieldForLayout(CGM.getContext(), *Field))
897899
continue;
898900

899901
// Emit the value of the initializer.
@@ -2618,8 +2620,10 @@ static llvm::Constant *EmitNullConstant(CodeGenModule &CGM,
26182620
cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl());
26192621

26202622
// Ignore empty bases.
2621-
if (base->isEmpty() ||
2622-
CGM.getContext().getASTRecordLayout(base).getNonVirtualSize()
2623+
if (isEmptyRecordForLayout(CGM.getContext(), I.getType()) ||
2624+
CGM.getContext()
2625+
.getASTRecordLayout(base)
2626+
.getNonVirtualSize()
26232627
.isZero())
26242628
continue;
26252629

@@ -2633,7 +2637,8 @@ static llvm::Constant *EmitNullConstant(CodeGenModule &CGM,
26332637
for (const auto *Field : record->fields()) {
26342638
// Fill in non-bitfields. (Bitfields always use a zero pattern, which we
26352639
// will fill in later.)
2636-
if (!Field->isBitField() && !Field->isZeroSize(CGM.getContext())) {
2640+
if (!Field->isBitField() &&
2641+
!isEmptyFieldForLayout(CGM.getContext(), Field)) {
26372642
unsigned fieldIndex = layout.getLLVMFieldNo(Field);
26382643
elements[fieldIndex] = CGM.EmitNullConstant(Field->getType());
26392644
}
@@ -2655,7 +2660,7 @@ static llvm::Constant *EmitNullConstant(CodeGenModule &CGM,
26552660
cast<CXXRecordDecl>(I.getType()->castAs<RecordType>()->getDecl());
26562661

26572662
// Ignore empty bases.
2658-
if (base->isEmpty())
2663+
if (isEmptyRecordForLayout(CGM.getContext(), I.getType()))
26592664
continue;
26602665

26612666
unsigned fieldIndex = layout.getVirtualBaseIndex(base);

clang/lib/CodeGen/CGOpenMPRuntime.cpp

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
#include "CGOpenMPRuntime.h"
14+
#include "ABIInfoImpl.h"
1415
#include "CGCXXABI.h"
1516
#include "CGCleanup.h"
1617
#include "CGDebugInfo.h"
@@ -7761,23 +7762,28 @@ class MappableExprsHandler {
77617762
for (const auto &I : RD->bases()) {
77627763
if (I.isVirtual())
77637764
continue;
7764-
const auto *Base = I.getType()->getAsCXXRecordDecl();
7765+
7766+
QualType BaseTy = I.getType();
7767+
const auto *Base = BaseTy->getAsCXXRecordDecl();
77657768
// Ignore empty bases.
7766-
if (Base->isEmpty() || CGF.getContext()
7767-
.getASTRecordLayout(Base)
7768-
.getNonVirtualSize()
7769-
.isZero())
7769+
if (isEmptyRecordForLayout(CGF.getContext(), BaseTy) ||
7770+
CGF.getContext()
7771+
.getASTRecordLayout(Base)
7772+
.getNonVirtualSize()
7773+
.isZero())
77707774
continue;
77717775

77727776
unsigned FieldIndex = RL.getNonVirtualBaseLLVMFieldNo(Base);
77737777
RecordLayout[FieldIndex] = Base;
77747778
}
77757779
// Fill in virtual bases.
77767780
for (const auto &I : RD->vbases()) {
7777-
const auto *Base = I.getType()->getAsCXXRecordDecl();
7781+
QualType BaseTy = I.getType();
77787782
// Ignore empty bases.
7779-
if (Base->isEmpty())
7783+
if (isEmptyRecordForLayout(CGF.getContext(), BaseTy))
77807784
continue;
7785+
7786+
const auto *Base = BaseTy->getAsCXXRecordDecl();
77817787
unsigned FieldIndex = RL.getVirtualBaseIndex(Base);
77827788
if (RecordLayout[FieldIndex])
77837789
continue;
@@ -7788,7 +7794,8 @@ class MappableExprsHandler {
77887794
for (const auto *Field : RD->fields()) {
77897795
// Fill in non-bitfields. (Bitfields always use a zero pattern, which we
77907796
// will fill in later.)
7791-
if (!Field->isBitField() && !Field->isZeroSize(CGF.getContext())) {
7797+
if (!Field->isBitField() &&
7798+
!isEmptyFieldForLayout(CGF.getContext(), Field)) {
77927799
unsigned FieldIndex = RL.getLLVMFieldNo(Field);
77937800
RecordLayout[FieldIndex] = Field;
77947801
}

clang/lib/CodeGen/CGRecordLayoutBuilder.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#include "CGRecordLayout.h"
13+
#include "ABIInfoImpl.h"
1414
#include "CGCXXABI.h"
15+
#include "CGRecordLayout.h"
1516
#include "CodeGenTypes.h"
1617
#include "clang/AST/ASTContext.h"
1718
#include "clang/AST/Attr.h"
@@ -384,7 +385,7 @@ void CGRecordLowering::accumulateFields(bool isNonVirtualBaseType) {
384385
Field = accumulateBitFields(isNonVirtualBaseType, Field, FieldEnd);
385386
assert((Field == FieldEnd || !Field->isBitField()) &&
386387
"Failed to accumulate all the bitfields");
387-
} else if (Field->isZeroSize(Context)) {
388+
} else if (isEmptyFieldForLayout(Context, *Field)) {
388389
// Empty fields have no storage.
389390
++Field;
390391
} else {
@@ -633,7 +634,7 @@ CGRecordLowering::accumulateBitFields(bool isNonVirtualBaseType,
633634
// non-reusable tail padding.
634635
CharUnits LimitOffset;
635636
for (auto Probe = Field; Probe != FieldEnd; ++Probe)
636-
if (!Probe->isZeroSize(Context)) {
637+
if (!isEmptyFieldForLayout(Context, *Probe)) {
637638
// A member with storage sets the limit.
638639
assert((getFieldBitOffset(*Probe) % CharBits) == 0 &&
639640
"Next storage is not byte-aligned");
@@ -731,7 +732,7 @@ void CGRecordLowering::accumulateBases() {
731732
// Bases can be zero-sized even if not technically empty if they
732733
// contain only a trailing array member.
733734
const CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl();
734-
if (!BaseDecl->isEmpty() &&
735+
if (!isEmptyRecordForLayout(Context, Base.getType()) &&
735736
!Context.getASTRecordLayout(BaseDecl).getNonVirtualSize().isZero())
736737
Members.push_back(MemberInfo(Layout.getBaseClassOffset(BaseDecl),
737738
MemberInfo::Base, getStorageType(BaseDecl), BaseDecl));
@@ -879,7 +880,7 @@ CGRecordLowering::calculateTailClippingOffset(bool isNonVirtualBaseType) const {
879880
if (!isNonVirtualBaseType && isOverlappingVBaseABI())
880881
for (const auto &Base : RD->vbases()) {
881882
const CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl();
882-
if (BaseDecl->isEmpty())
883+
if (isEmptyRecordForLayout(Context, Base.getType()))
883884
continue;
884885
// If the vbase is a primary virtual base of some base, then it doesn't
885886
// get its own storage location but instead lives inside of that base.
@@ -895,7 +896,7 @@ CGRecordLowering::calculateTailClippingOffset(bool isNonVirtualBaseType) const {
895896
void CGRecordLowering::accumulateVBases() {
896897
for (const auto &Base : RD->vbases()) {
897898
const CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl();
898-
if (BaseDecl->isEmpty())
899+
if (isEmptyRecordForLayout(Context, Base.getType()))
899900
continue;
900901
CharUnits Offset = Layout.getVBaseClassOffset(BaseDecl);
901902
// If the vbase is a primary virtual base of some base, then it doesn't
@@ -1161,7 +1162,7 @@ CodeGenTypes::ComputeRecordLayout(const RecordDecl *D, llvm::StructType *Ty) {
11611162
const FieldDecl *FD = *it;
11621163

11631164
// Ignore zero-sized fields.
1164-
if (FD->isZeroSize(getContext()))
1165+
if (isEmptyFieldForLayout(getContext(), FD))
11651166
continue;
11661167

11671168
// For non-bit-fields, just check that the LLVM struct offset matches the

clang/lib/CodeGen/CodeGenTBAA.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
//===----------------------------------------------------------------------===//
1616

1717
#include "CodeGenTBAA.h"
18+
#include "ABIInfoImpl.h"
1819
#include "CGCXXABI.h"
1920
#include "CGRecordLayout.h"
2021
#include "CodeGenTypes.h"
@@ -440,7 +441,7 @@ CodeGenTBAA::CollectFields(uint64_t BaseOffset,
440441
unsigned idx = 0;
441442
for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end();
442443
i != e; ++i, ++idx) {
443-
if ((*i)->isZeroSize(Context))
444+
if (isEmptyFieldForLayout(Context, *i))
444445
continue;
445446

446447
uint64_t Offset =
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
// RUN: %clang_cc1 -emit-llvm < %s | grep "zeroinitializer, i16 16877"
1+
// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefixes=CHECK,EMPTY
2+
// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-windows-msvc -o - | FileCheck %s --check-prefixes=CHECK,EMPTY-MSVC
23
// PR4390
34
struct sysfs_dirent {
4-
union { struct sysfs_elem_dir {} s_dir; };
5+
union { struct sysfs_elem_dir { int x; } s_dir; };
56
unsigned short s_mode;
67
};
78
struct sysfs_dirent sysfs_root = { {}, 16877 };
89

10+
// CHECK: @sysfs_root = {{.*}}global { %union.anon, i16, [2 x i8] } { %union.anon zeroinitializer, i16 16877, [2 x i8] zeroinitializer }
11+
12+
struct Foo {
13+
union { struct empty {} x; };
14+
unsigned short s_mode;
15+
};
16+
struct Foo foo = { {}, 16877 };
17+
18+
// EMPTY: @foo = {{.*}}global %struct.Foo { i16 16877 }
19+
// EMPTY-MSVC: @foo = {{.*}}global %struct.Foo { [4 x i8] zeroinitializer, i16 16877 }

clang/test/CodeGen/X86/x86_64-vaarg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ typedef struct {
5656
// CHECK: vaarg.end:
5757
// CHECK-NEXT: [[VAARG_ADDR:%.*]] = phi ptr [ [[TMP1]], [[VAARG_IN_REG]] ], [ [[OVERFLOW_ARG_AREA]], [[VAARG_IN_MEM]] ]
5858
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[RETVAL]], ptr align 8 [[VAARG_ADDR]], i64 8, i1 false)
59-
// CHECK-NEXT: [[TMP3:%.*]] = load double, ptr [[RETVAL]], align 8
59+
// CHECK-NEXT: [[COERCE_DIVE:%.*]] = getelementptr inbounds nuw [[STRUCT_S1]], ptr [[RETVAL]], i32 0, i32 0
60+
// CHECK-NEXT: [[TMP3:%.*]] = load double, ptr [[COERCE_DIVE]], align 8
6061
// CHECK-NEXT: ret double [[TMP3]]
6162
//
6263
s1 f(int z, ...) {

clang/test/CodeGen/paren-list-agg-init.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,13 @@ struct E {
4848
~E() {};
4949
};
5050

51-
// CHECK-DAG: [[STRUCT_F:%.*]] = type { i8 }
5251
struct F {
5352
F (int i = 1);
5453
F (const F &f) = delete;
5554
F (F &&f) = default;
5655
};
5756

58-
// CHECK-DAG: [[STRUCT_G:%.*]] = type <{ i32, [[STRUCT_F]], [3 x i8] }>
57+
// CHECK-DAG: [[STRUCT_G:%.*]] = type <{ i32, [4 x i8] }>
5958
struct G {
6059
int a;
6160
F f;
@@ -78,12 +77,12 @@ namespace gh61145 {
7877
~Vec();
7978
};
8079

81-
// CHECK-DAG: [[STRUCT_S1:%.*]] = type { [[STRUCT_VEC]] }
80+
// CHECK-DAG: [[STRUCT_S1:%.*]] = type { i8 }
8281
struct S1 {
8382
Vec v;
8483
};
8584

86-
// CHECK-DAG: [[STRUCT_S2:%.*]] = type { [[STRUCT_VEC]], i8 }
85+
// CHECK-DAG: [[STRUCT_S2:%.*]] = type { i8, i8 }
8786
struct S2 {
8887
Vec v;
8988
char c;
@@ -377,7 +376,7 @@ void foo18() {
377376
// CHECK-NEXT: [[G:%.*g.*]] = alloca [[STRUCT_G]], align 4
378377
// CHECK-NEXT: [[A:%.*a.*]] = getelementptr inbounds nuw [[STRUCT_G]], ptr [[G]], i32 0, i32 0
379378
// CHECK-NEXT: store i32 2, ptr [[A]], align 4
380-
// CHECK-NEXT: [[F:%.*f.*]] = getelementptr inbounds nuw [[STRUCT_G]], ptr [[G]], i32 0, i32 1
379+
// CHECK-NEXT: [[F:%.*]] = getelementptr inbounds i8, ptr [[G]], i64 4
381380
// CHECk-NEXT: call void @{{.*F.*}}(ptr noundef nonnull align 1 dereferenceable(1)) [[F]], ie32 noundef 1)
382381
// CHECK: ret void
383382
void foo19() {
@@ -392,9 +391,8 @@ namespace gh61145 {
392391
// CHECK-NEXT: [[AGG_TMP_ENSURED:%.*agg.tmp.ensured.*]] = alloca [[STRUCT_S1]], align 1
393392
// a.k.a. Vec::Vec()
394393
// CHECK-NEXT: call void @_ZN7gh611453VecC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[V]])
395-
// CHECK-NEXT: [[V1:%.*v1.*]] = getelementptr inbounds nuw [[STRUCT_S1]], ptr [[AGG_TMP_ENSURED]], i32 0, i32 0
396394
// a.k.a. Vec::Vec(Vec&&)
397-
// CHECK-NEXT: call void @_ZN7gh611453VecC1EOS0_(ptr noundef nonnull align 1 dereferenceable(1) [[V1]], ptr noundef nonnull align 1 dereferenceable(1) [[V]])
395+
// CHECK-NEXT: call void @_ZN7gh611453VecC1EOS0_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_TMP_ENSURED]], ptr noundef nonnull align 1 dereferenceable(1) [[V]])
398396
// a.k.a. S1::~S1()
399397
// CHECK-NEXT: call void @_ZN7gh611452S1D1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_TMP_ENSURED]])
400398
// a.k.a.Vec::~Vec()
@@ -413,9 +411,8 @@ namespace gh61145 {
413411
// CHECK-NEXT: [[AGG_TMP_ENSURED:%.*agg.tmp.ensured.*]] = alloca [[STRUCT_S2]], align 1
414412
// a.k.a. Vec::Vec()
415413
// CHECK-NEXT: call void @_ZN7gh611453VecC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[V]])
416-
// CHECK-NEXT: [[V1:%.*v1.*]] = getelementptr inbounds nuw [[STRUCT_S2]], ptr [[AGG_TMP_ENSURED]], i32 0, i32 0
417414
// a.k.a. Vec::Vec(Vec&&)
418-
// CHECK-NEXT: call void @_ZN7gh611453VecC1EOS0_(ptr noundef nonnull align 1 dereferenceable(1) [[V1]], ptr noundef nonnull align 1 dereferenceable(1) [[V]])
415+
// CHECK-NEXT: call void @_ZN7gh611453VecC1EOS0_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_TMP_ENSURED]], ptr noundef nonnull align 1 dereferenceable(1) [[V]])
419416
// CHECK-NEXT: [[C:%.*c.*]] = getelementptr inbounds nuw [[STRUCT_S2]], ptr [[AGG_TMP_ENSURED]], i32 0, i32
420417
// CHECK-NEXT: store i8 0, ptr [[C]], align 1
421418
// a.k.a. S2::~S2()

clang/test/CodeGen/union-init2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ union z {
1313
};
1414
union z y = {};
1515

16-
// CHECK: @foo = {{.*}}global %union.Foo zeroinitializer, align 1
16+
// CHECK: @foo = {{.*}}global %union.Foo undef, align 1
1717
// CHECK-CXX: @foo = {{.*}}global %union.Foo undef, align 1
1818
union Foo {
1919
struct Empty {} val;

clang/test/CodeGen/voidptr-vaarg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ typedef struct {
245245
// CHECK-NEXT: [[ARGP_NEXT:%.*]] = getelementptr inbounds i8, ptr [[ARGP_CUR]], i32 4
246246
// CHECK-NEXT: store ptr [[ARGP_NEXT]], ptr [[LIST_ADDR]], align 4
247247
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[RETVAL]], ptr align 4 [[ARGP_CUR]], i32 4, i1 false)
248-
// CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[RETVAL]], align 4
248+
// CHECK-NEXT: [[COERCE_DIVE:%.*]] = getelementptr inbounds nuw [[STRUCT_EMPTY_INT_T]], ptr [[RETVAL]], i32 0, i32 0
249+
// CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[COERCE_DIVE]], align 4
249250
// CHECK-NEXT: ret i32 [[TMP0]]
250251
//
251252
empty_int_t empty_int(__builtin_va_list list) {

0 commit comments

Comments
 (0)