From dd3e030cca68894f963226ba045bcc31b6609994 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 16 Jul 2021 20:26:40 +0200 Subject: [PATCH] [BPF] Use elementtype attribute for preserve.array/struct.index intrinsics Use the elementtype attribute introduced in D105407 for the llvm.preserve.array/struct.index intrinsics. It carries the element type of the GEP these intrinsics effectively encode. This patch: * Adds a verifier check that the attribute is required. * Adds it in the IRBuilder methods for these intrinsics. * Autoupgrades old bitcode without the attribute. * Updates the lowering code to use the attribute rather than the pointer element type. * Updates lots of tests to specify the attribute. * Adds -force-opaque-pointers to the intrinsic-array.ll test to demonstrate they work now. https://reviews.llvm.org/D106184 --- docs/LangRef.rst | 10 +++++++ include/llvm/IR/Attributes.h | 3 ++ lib/Bitcode/Reader/BitcodeReader.cpp | 26 ++++++++++++++---- lib/IR/Attributes.cpp | 4 +++ lib/IR/IRBuilder.cpp | 16 ++++++++--- lib/IR/Verifier.cpp | 8 ++++++ lib/Target/BPF/BPFAbstractMemberAccess.cpp | 14 ++++++---- test/Bitcode/upgrade-elementtype.ll | 15 ++++++++++ test/Bitcode/upgrade-elementtype.ll.bc | Bin 0 -> 1284 bytes test/CodeGen/BPF/CORE/field-reloc-alu32.ll | 2 +- .../BPF/CORE/field-reloc-bitfield-1-bpfeb.ll | 2 +- .../BPF/CORE/field-reloc-bitfield-1.ll | 2 +- .../BPF/CORE/field-reloc-bitfield-2-bpfeb.ll | 2 +- .../BPF/CORE/field-reloc-bitfield-2.ll | 2 +- .../CodeGen/BPF/CORE/field-reloc-duplicate.ll | 4 +-- test/CodeGen/BPF/CORE/intrinsic-array-2.ll | 2 +- test/CodeGen/BPF/CORE/intrinsic-array.ll | 6 ++-- .../CORE/intrinsic-fieldinfo-byte-size-1.ll | 8 +++--- .../CORE/intrinsic-fieldinfo-byte-size-2.ll | 4 +-- .../CORE/intrinsic-fieldinfo-byte-size-3.ll | 6 ++-- .../CORE/intrinsic-fieldinfo-byte-size-4.ll | 2 +- .../CORE/intrinsic-fieldinfo-existence-1.ll | 6 ++-- .../CORE/intrinsic-fieldinfo-existence-2.ll | 4 +-- .../CORE/intrinsic-fieldinfo-existence-3.ll | 6 ++-- .../CORE/intrinsic-fieldinfo-existence-4.ll | 2 +- .../intrinsic-fieldinfo-lshift-1-bpfeb.ll | 8 +++--- .../BPF/CORE/intrinsic-fieldinfo-lshift-1.ll | 8 +++--- .../BPF/CORE/intrinsic-fieldinfo-lshift-2.ll | 4 +-- .../BPF/CORE/intrinsic-fieldinfo-rshift-1.ll | 8 +++--- .../BPF/CORE/intrinsic-fieldinfo-rshift-2.ll | 4 +-- .../BPF/CORE/intrinsic-fieldinfo-rshift-3.ll | 6 ++-- .../CORE/intrinsic-fieldinfo-signedness-1.ll | 6 ++-- .../CORE/intrinsic-fieldinfo-signedness-2.ll | 6 ++-- .../CORE/intrinsic-fieldinfo-signedness-3.ll | 10 +++---- test/CodeGen/BPF/CORE/intrinsic-struct.ll | 2 +- test/CodeGen/BPF/CORE/no-elf-ama-symbol.ll | 2 +- test/CodeGen/BPF/CORE/no-narrow-load.ll | 4 +-- .../BPF/CORE/offset-reloc-access-str.ll | 4 +-- test/CodeGen/BPF/CORE/offset-reloc-basic.ll | 2 +- .../BPF/CORE/offset-reloc-cast-array-1.ll | 10 +++---- .../BPF/CORE/offset-reloc-cast-array-2.ll | 12 ++++---- .../BPF/CORE/offset-reloc-cast-struct-1.ll | 4 +-- .../BPF/CORE/offset-reloc-cast-struct-2.ll | 4 +-- .../BPF/CORE/offset-reloc-cast-struct-3.ll | 6 ++-- .../BPF/CORE/offset-reloc-cast-union-2.ll | 2 +- .../CodeGen/BPF/CORE/offset-reloc-end-load.ll | 2 +- test/CodeGen/BPF/CORE/offset-reloc-end-ret.ll | 2 +- .../BPF/CORE/offset-reloc-fieldinfo-1.ll | 2 +- .../CORE/offset-reloc-fieldinfo-2-bpfeb.ll | 2 +- .../BPF/CORE/offset-reloc-fieldinfo-2.ll | 2 +- .../CodeGen/BPF/CORE/offset-reloc-global-1.ll | 2 +- .../CodeGen/BPF/CORE/offset-reloc-global-2.ll | 6 ++-- .../CodeGen/BPF/CORE/offset-reloc-global-3.ll | 2 +- test/CodeGen/BPF/CORE/offset-reloc-ignore.ll | 2 +- .../BPF/CORE/offset-reloc-middle-chain.ll | 6 ++-- .../BPF/CORE/offset-reloc-multi-array-1.ll | 8 +++--- .../BPF/CORE/offset-reloc-multi-array-2.ll | 10 +++---- .../BPF/CORE/offset-reloc-multilevel.ll | 4 +-- .../BPF/CORE/offset-reloc-pointer-1.ll | 2 +- .../BPF/CORE/offset-reloc-pointer-2.ll | 4 +-- .../BPF/CORE/offset-reloc-struct-anonymous.ll | 6 ++-- .../BPF/CORE/offset-reloc-struct-array.ll | 6 ++-- .../BPF/CORE/offset-reloc-typedef-array.ll | 4 +-- .../BPF/CORE/offset-reloc-typedef-struct-2.ll | 2 +- .../BPF/CORE/offset-reloc-typedef-struct.ll | 2 +- test/CodeGen/BPF/CORE/offset-reloc-typedef.ll | 4 +-- test/CodeGen/BPF/CORE/offset-reloc-union.ll | 2 +- test/CodeGen/BPF/CORE/store-addr.ll | 2 +- test/Verifier/elementtype.ll | 9 ++++++ 69 files changed, 218 insertions(+), 143 deletions(-) create mode 100644 test/Bitcode/upgrade-elementtype.ll create mode 100644 test/Bitcode/upgrade-elementtype.ll.bc diff --git a/docs/LangRef.rst b/docs/LangRef.rst index cb615ebae76..7dd60be987d 100644 --- a/docs/LangRef.rst +++ b/docs/LangRef.rst @@ -1183,6 +1183,8 @@ Currently, only the following parameter attributes are defined: The sret type argument specifies the in memory type, which must be the same as the pointee type of the argument. +.. _attr_elementtype: + ``elementtype()`` The ``elementtype`` argument attribute can be used to specify a pointer @@ -22553,6 +22555,10 @@ The ``base`` is the array base address. The ``dim`` is the array dimension. The ``base`` is a pointer if ``dim`` equals 0. The ``index`` is the last access index into the array or pointer. +The ``base`` argument must be annotated with an :ref:`elementtype +` attribute at the call-site. This attribute specifies the +getelementptr element type. + Semantics: """""""""" @@ -22618,6 +22624,10 @@ Arguments: The ``base`` is the structure base address. The ``gep_index`` is the struct member index based on IR structures. The ``di_index`` is the struct member index based on debuginfo. +The ``base`` argument must be annotated with an :ref:`elementtype +` attribute at the call-site. This attribute specifies the +getelementptr element type. + Semantics: """""""""" diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h index 96c8054e7fa..165e50e833e 100644 --- a/include/llvm/IR/Attributes.h +++ b/include/llvm/IR/Attributes.h @@ -715,6 +715,9 @@ public: /// Return the inalloca type for the specified function parameter. Type *getParamInAllocaType(unsigned ArgNo) const; + /// Return the elementtype type for the specified function parameter. + Type *getParamElementType(unsigned ArgNo) const; + /// Get the stack alignment. MaybeAlign getStackAlignment(unsigned Index) const; diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 07db3c05eb4..42e17f018a1 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -682,9 +682,10 @@ private: return getFnValueByID(ValNo, Ty); } - /// Upgrades old-style typeless byval or sret attributes by adding the - /// corresponding argument's pointee type. - void propagateByValSRetTypes(CallBase *CB, ArrayRef ArgsTys); + /// Upgrades old-style typeless byval/sret/inalloca attributes by adding the + /// corresponding argument's pointee type. Also upgrades intrinsics that now + /// require an elementtype attribute. + void propagateAttributeTypes(CallBase *CB, ArrayRef ArgsTys); /// Converts alignment exponent (i.e. power of two (or zero)) to the /// corresponding alignment to use. If alignment is too large, returns @@ -3809,7 +3810,7 @@ Error BitcodeReader::typeCheckLoadStoreInst(Type *ValType, Type *PtrType) { return Error::success(); } -void BitcodeReader::propagateByValSRetTypes(CallBase *CB, +void BitcodeReader::propagateAttributeTypes(CallBase *CB, ArrayRef ArgsTys) { for (unsigned i = 0; i != CB->arg_size(); ++i) { for (Attribute::AttrKind Kind : {Attribute::ByVal, Attribute::StructRet, @@ -3838,6 +3839,19 @@ void BitcodeReader::propagateByValSRetTypes(CallBase *CB, CB->addParamAttr(i, NewAttr); } } + + switch (CB->getIntrinsicID()) { + case Intrinsic::preserve_array_access_index: + case Intrinsic::preserve_struct_access_index: + if (!CB->getAttributes().getParamElementType(0)) { + Type *ElTy = cast(ArgsTys[0])->getElementType(); + Attribute NewAttr = Attribute::get(Context, Attribute::ElementType, ElTy); + CB->addParamAttr(0, NewAttr); + } + break; + default: + break; + } } /// Lazily parse the specified function body block. @@ -4679,7 +4693,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) { cast(I)->setCallingConv( static_cast(CallingConv::MaxID & CCInfo)); cast(I)->setAttributes(PAL); - propagateByValSRetTypes(cast(I), ArgsTys); + propagateAttributeTypes(cast(I), ArgsTys); break; } @@ -5318,7 +5332,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) { TCK = CallInst::TCK_NoTail; cast(I)->setTailCallKind(TCK); cast(I)->setAttributes(PAL); - propagateByValSRetTypes(cast(I), ArgsTys); + propagateAttributeTypes(cast(I), ArgsTys); if (FMF.any()) { if (!isa(I)) return error("Fast-math-flags specified for call without " diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index 4ef61c78de6..fc05f52ee74 100644 --- a/lib/IR/Attributes.cpp +++ b/lib/IR/Attributes.cpp @@ -1467,6 +1467,10 @@ Type *AttributeList::getParamInAllocaType(unsigned Index) const { return getAttributes(Index + FirstArgIndex).getInAllocaType(); } +Type *AttributeList::getParamElementType(unsigned Index) const { + return getAttributes(Index + FirstArgIndex).getElementType(); +} + MaybeAlign AttributeList::getStackAlignment(unsigned Index) const { return getAttributes(Index).getStackAlignment(); } diff --git a/lib/IR/IRBuilder.cpp b/lib/IR/IRBuilder.cpp index 5ea9867a246..0f4945bad5a 100644 --- a/lib/IR/IRBuilder.cpp +++ b/lib/IR/IRBuilder.cpp @@ -1143,9 +1143,11 @@ Value *IRBuilderBase::CreateExtractInteger( Value *IRBuilderBase::CreatePreserveArrayAccessIndex( Type *ElTy, Value *Base, unsigned Dimension, unsigned LastIndex, MDNode *DbgInfo) { - assert(isa(Base->getType()) && - "Invalid Base ptr type for preserve.array.access.index."); auto *BaseType = Base->getType(); + assert(isa(BaseType) && + "Invalid Base ptr type for preserve.array.access.index."); + assert(cast(BaseType)->isOpaqueOrPointeeTypeMatches(ElTy) && + "Pointer element type mismatch"); Value *LastIndexV = getInt32(LastIndex); Constant *Zero = ConstantInt::get(Type::getInt32Ty(Context), 0); @@ -1162,6 +1164,8 @@ Value *IRBuilderBase::CreatePreserveArrayAccessIndex( Value *DimV = getInt32(Dimension); CallInst *Fn = CreateCall(FnPreserveArrayAccessIndex, {Base, DimV, LastIndexV}); + Fn->addParamAttr( + 0, Attribute::get(Fn->getContext(), Attribute::ElementType, ElTy)); if (DbgInfo) Fn->setMetadata(LLVMContext::MD_preserve_access_index, DbgInfo); @@ -1190,9 +1194,11 @@ Value *IRBuilderBase::CreatePreserveUnionAccessIndex( Value *IRBuilderBase::CreatePreserveStructAccessIndex( Type *ElTy, Value *Base, unsigned Index, unsigned FieldIndex, MDNode *DbgInfo) { - assert(isa(Base->getType()) && - "Invalid Base ptr type for preserve.struct.access.index."); auto *BaseType = Base->getType(); + assert(isa(BaseType) && + "Invalid Base ptr type for preserve.struct.access.index."); + assert(cast(BaseType)->isOpaqueOrPointeeTypeMatches(ElTy) && + "Pointer element type mismatch"); Value *GEPIndex = getInt32(Index); Constant *Zero = ConstantInt::get(Type::getInt32Ty(Context), 0); @@ -1206,6 +1212,8 @@ Value *IRBuilderBase::CreatePreserveStructAccessIndex( Value *DIIndex = getInt32(FieldIndex); CallInst *Fn = CreateCall(FnPreserveStructAccessIndex, {Base, GEPIndex, DIIndex}); + Fn->addParamAttr( + 0, Attribute::get(Fn->getContext(), Attribute::ElementType, ElTy)); if (DbgInfo) Fn->setMetadata(LLVMContext::MD_preserve_access_index, DbgInfo); diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index d23603c776b..c86536f505f 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -5292,6 +5292,14 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) { NoAliasScopeDecls.push_back(cast(&Call)); break; } + case Intrinsic::preserve_array_access_index: + case Intrinsic::preserve_struct_access_index: { + Type *ElemTy = Call.getAttributes().getParamElementType(0); + Assert(ElemTy, + "Intrinsic requires elementtype attribute on first argument.", + &Call); + break; + } }; } diff --git a/lib/Target/BPF/BPFAbstractMemberAccess.cpp b/lib/Target/BPF/BPFAbstractMemberAccess.cpp index e4c0cd70b35..ab7e848409d 100644 --- a/lib/Target/BPF/BPFAbstractMemberAccess.cpp +++ b/lib/Target/BPF/BPFAbstractMemberAccess.cpp @@ -268,6 +268,11 @@ static uint32_t calcArraySize(const DICompositeType *CTy, uint32_t StartDim) { return DimSize; } +static Type *getBaseElementType(const CallInst *Call) { + // Element type is stored in an elementtype() attribute on the first param. + return Call->getAttributes().getParamElementType(0); +} + /// Check whether a call is a preserve_*_access_index intrinsic call or not. bool BPFAbstractMemberAccess::IsPreserveDIAccessIndexCall(const CallInst *Call, CallInfo &CInfo) { @@ -284,8 +289,7 @@ bool BPFAbstractMemberAccess::IsPreserveDIAccessIndexCall(const CallInst *Call, report_fatal_error("Missing metadata for llvm.preserve.array.access.index intrinsic"); CInfo.AccessIndex = getConstant(Call->getArgOperand(2)); CInfo.Base = Call->getArgOperand(0); - CInfo.RecordAlignment = - DL->getABITypeAlign(CInfo.Base->getType()->getPointerElementType()); + CInfo.RecordAlignment = DL->getABITypeAlign(getBaseElementType(Call)); return true; } if (GV->getName().startswith("llvm.preserve.union.access.index")) { @@ -306,8 +310,7 @@ bool BPFAbstractMemberAccess::IsPreserveDIAccessIndexCall(const CallInst *Call, report_fatal_error("Missing metadata for llvm.preserve.struct.access.index intrinsic"); CInfo.AccessIndex = getConstant(Call->getArgOperand(2)); CInfo.Base = Call->getArgOperand(0); - CInfo.RecordAlignment = - DL->getABITypeAlign(CInfo.Base->getType()->getPointerElementType()); + CInfo.RecordAlignment = DL->getABITypeAlign(getBaseElementType(Call)); return true; } if (GV->getName().startswith("llvm.bpf.preserve.field.info")) { @@ -368,8 +371,7 @@ void BPFAbstractMemberAccess::replaceWithGEP(std::vector &CallList, IdxList.push_back(Call->getArgOperand(GEPIndex)); auto *GEP = GetElementPtrInst::CreateInBounds( - Call->getArgOperand(0)->getType()->getPointerElementType(), - Call->getArgOperand(0), IdxList, "", Call); + getBaseElementType(Call), Call->getArgOperand(0), IdxList, "", Call); Call->replaceAllUsesWith(GEP); Call->eraseFromParent(); } diff --git a/test/Bitcode/upgrade-elementtype.ll b/test/Bitcode/upgrade-elementtype.ll new file mode 100644 index 00000000000..16c36059388 --- /dev/null +++ b/test/Bitcode/upgrade-elementtype.ll @@ -0,0 +1,15 @@ +; RUN: opt -S < %s.bc | FileCheck %s + +%struct.s = type { i32, i32 } + +define void @test(%struct.s* %arg) { +; CHECK-LABEL: define void @test +; CHECK: %x = call %struct.s* @llvm.preserve.array.access.index.p0s_struct.ss.p0s_struct.ss(%struct.s* elementtype(%struct.s) %arg, i32 0, i32 2) +; CHECK: %1 = call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* elementtype(%struct.s) %x, i32 1, i32 1) + %x = call %struct.s* @llvm.preserve.array.access.index.p0s_struct.ss.p0s_struct.ss(%struct.s* %arg, i32 0, i32 2) + call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* %x, i32 1, i32 1) + ret void +} + +declare %struct.s* @llvm.preserve.array.access.index.p0s_struct.ss.p0s_struct.ss(%struct.s*, i32, i32) +declare i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s*, i32, i32) diff --git a/test/Bitcode/upgrade-elementtype.ll.bc b/test/Bitcode/upgrade-elementtype.ll.bc new file mode 100644 index 0000000000000000000000000000000000000000..e741225ea3431e53dacf3fb15132964ae34e9f57 GIT binary patch literal 1284 zcmZ7$ZA=C6cX(RK^S zbw@jXVCN5-_(PKZ=zc6=i9edGS=6H)Go*1%v$)L|2xz;-8nU{j%bINO(RPV@FYohp z&-2{#c`kN&>kTyk^#Fh&71Qz7``?bf^Y_xbjs4L+8ItK$05l<@u}%-_5Puk5EM}N< z<`rj@q{(tk#;abh$6IxZ&xfL9Z=LH}ql+g^YBR2RyTRm2xVfC(aH?5IlFn;&BYFI5 zHO-z*(BI2UE?(2s*_AqWDLXhv=kmz!6&e5%VN*N)3O#aJ(b9f{N1)7SQtIZuM6!|R z`$)zBf(kE}INm$Y{MFpt?!F4xbBXJ?>8h)E$^#Y1zFz}?65+OF@gH55|05iFRVRP6xbF$wphuv_KQ zt*&VAWvEf6zNQv$E6DA6)}EBx3z1}q!!F|3v|HdfY=)DEBLYVYt%WAIn}Q{Vm|%!< z6;?g4o6Kpq^wfr4yXw=8GFPm(8V^yyXI5= zm|`t?){?HlTcUZMH7DfOdGRRv=(Abt1GzOTs=gZ+xB(%+#Y1CQ#4Cg}LTFKFz4som z2Z-N2u#$ph2T`KoF3N)L)NZcmR-L;0dTKMK+bmL*lJ+;5ZdB86&ayoVacjZT@gfng zFcrZf>Hfa`6d_eW_n~ghM?KPOw^p>D%5+k|dTrIGJa;*6E{N7FYexlnwrZ=e)&ye3 z3mPxp~47WY-31e8f@6=UFuWppITPOf`t2G<9FU8w<(VS#0 z1<`hE#gZ3Mj<$k(X%fd!RFkNH148RBcj2y=cwAIgX=0lpwrS!|51b%jnSqFXQdIt0 zgcT2b%CM!M_1c{bRh88u_nm(5lW0cG%8Exf*q#F0lVE#L*6Zv^@FkkkCNxux4S`P7 zD{N+fOS5)V@+@mv7iV{(%7wq=o|c ztaC^)yI6A6bi(A|2?oqbF2E!WfE-~HB-?qwOD<~X1N1NHKvc7QzFkrb`GcVg7s4MI zxqv_D4}|?jUm)O{Hu{E#{lTDdd}72OF>*}sd@vOFcsOK4vIE>f+ZRgzGam0Y9W*+| Q7|~-3hDOFGPCk$8Um{4QGynhq literal 0 HcmV?d00001 diff --git a/test/CodeGen/BPF/CORE/field-reloc-alu32.ll b/test/CodeGen/BPF/CORE/field-reloc-alu32.ll index 03c157f000f..7596ba03b5c 100644 --- a/test/CodeGen/BPF/CORE/field-reloc-alu32.ll +++ b/test/CodeGen/BPF/CORE/field-reloc-alu32.ll @@ -17,7 +17,7 @@ target triple = "bpf" ; Function Attrs: nounwind readnone define dso_local i32 @f() local_unnamed_addr #0 !dbg !15 { entry: - %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.bs(%struct.b* nonnull @c, i32 1, i32 1), !dbg !18, !llvm.preserve.access.index !6 + %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.bs(%struct.b* elementtype(%struct.b) nonnull @c, i32 1, i32 1), !dbg !18, !llvm.preserve.access.index !6 %1 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %0, i64 0), !dbg !19 ret i32 %1, !dbg !20 } diff --git a/test/CodeGen/BPF/CORE/field-reloc-bitfield-1-bpfeb.ll b/test/CodeGen/BPF/CORE/field-reloc-bitfield-1-bpfeb.ll index 51a9e6e88b5..d37e6a1093d 100644 --- a/test/CodeGen/BPF/CORE/field-reloc-bitfield-1-bpfeb.ll +++ b/test/CodeGen/BPF/CORE/field-reloc-bitfield-1-bpfeb.ll @@ -28,7 +28,7 @@ target triple = "bpfeb" define dso_local i32 @test(%struct.s* %arg) local_unnamed_addr #0 !dbg !13 { entry: call void @llvm.dbg.value(metadata %struct.s* %arg, metadata !30, metadata !DIExpression()), !dbg !31 - %0 = tail call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.ss(%struct.s* %arg, i32 5, i32 6), !dbg !32, !llvm.preserve.access.index !18 + %0 = tail call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.ss(%struct.s* elementtype(%struct.s) %arg, i32 5, i32 6), !dbg !32, !llvm.preserve.access.index !18 %1 = tail call i32 @llvm.bpf.preserve.field.info.p0i8(i8* %0, i64 0), !dbg !33 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i8(i8* %0, i64 1), !dbg !34 %add = add i32 %2, %1, !dbg !35 diff --git a/test/CodeGen/BPF/CORE/field-reloc-bitfield-1.ll b/test/CodeGen/BPF/CORE/field-reloc-bitfield-1.ll index d9277658770..3006bd829c5 100644 --- a/test/CodeGen/BPF/CORE/field-reloc-bitfield-1.ll +++ b/test/CodeGen/BPF/CORE/field-reloc-bitfield-1.ll @@ -28,7 +28,7 @@ target triple = "bpfel" define dso_local i32 @test(%struct.s* %arg) local_unnamed_addr #0 !dbg !13 { entry: call void @llvm.dbg.value(metadata %struct.s* %arg, metadata !30, metadata !DIExpression()), !dbg !31 - %0 = tail call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.ss(%struct.s* %arg, i32 5, i32 6), !dbg !32, !llvm.preserve.access.index !18 + %0 = tail call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.ss(%struct.s* elementtype(%struct.s) %arg, i32 5, i32 6), !dbg !32, !llvm.preserve.access.index !18 %1 = tail call i32 @llvm.bpf.preserve.field.info.p0i8(i8* %0, i64 0), !dbg !33 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i8(i8* %0, i64 1), !dbg !34 %add = add i32 %2, %1, !dbg !35 diff --git a/test/CodeGen/BPF/CORE/field-reloc-bitfield-2-bpfeb.ll b/test/CodeGen/BPF/CORE/field-reloc-bitfield-2-bpfeb.ll index c71546f52f7..9a6d7786be0 100644 --- a/test/CodeGen/BPF/CORE/field-reloc-bitfield-2-bpfeb.ll +++ b/test/CodeGen/BPF/CORE/field-reloc-bitfield-2-bpfeb.ll @@ -29,7 +29,7 @@ target triple = "bpfeb" define dso_local i32 @test(%struct.s* %arg) local_unnamed_addr #0 !dbg !13 { entry: call void @llvm.dbg.value(metadata %struct.s* %arg, metadata !27, metadata !DIExpression()), !dbg !28 - %0 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.ss(%struct.s* %arg, i32 1, i32 4), !dbg !29, !llvm.preserve.access.index !18 + %0 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.ss(%struct.s* elementtype(%struct.s) %arg, i32 1, i32 4), !dbg !29, !llvm.preserve.access.index !18 %1 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %0, i64 0), !dbg !30 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %0, i64 1), !dbg !31 %add = add i32 %2, %1, !dbg !32 diff --git a/test/CodeGen/BPF/CORE/field-reloc-bitfield-2.ll b/test/CodeGen/BPF/CORE/field-reloc-bitfield-2.ll index 78534fe075a..8bf0dbffdf3 100644 --- a/test/CodeGen/BPF/CORE/field-reloc-bitfield-2.ll +++ b/test/CodeGen/BPF/CORE/field-reloc-bitfield-2.ll @@ -29,7 +29,7 @@ target triple = "bpfel" define dso_local i32 @test(%struct.s* %arg) local_unnamed_addr #0 !dbg !13 { entry: call void @llvm.dbg.value(metadata %struct.s* %arg, metadata !27, metadata !DIExpression()), !dbg !28 - %0 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.ss(%struct.s* %arg, i32 1, i32 4), !dbg !29, !llvm.preserve.access.index !18 + %0 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.ss(%struct.s* elementtype(%struct.s) %arg, i32 1, i32 4), !dbg !29, !llvm.preserve.access.index !18 %1 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %0, i64 0), !dbg !30 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %0, i64 1), !dbg !31 %add = add i32 %2, %1, !dbg !32 diff --git a/test/CodeGen/BPF/CORE/field-reloc-duplicate.ll b/test/CodeGen/BPF/CORE/field-reloc-duplicate.ll index b83f45a6b91..b7835b80de3 100644 --- a/test/CodeGen/BPF/CORE/field-reloc-duplicate.ll +++ b/test/CodeGen/BPF/CORE/field-reloc-duplicate.ll @@ -19,7 +19,7 @@ entry: store %struct.s1* %arg, %struct.s1** %arg.addr, align 8, !tbaa !18 call void @llvm.dbg.declare(metadata %struct.s1** %arg.addr, metadata !17, metadata !DIExpression()), !dbg !22 %0 = load %struct.s1*, %struct.s1** %arg.addr, align 8, !dbg !23, !tbaa !18 - %1 = call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %0, i32 0, i32 0), !dbg !24, !llvm.preserve.access.index !12 + %1 = call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %0, i32 0, i32 0), !dbg !24, !llvm.preserve.access.index !12 %2 = load i32, i32* %1, align 4, !dbg !24, !tbaa !25 ret i32 %2, !dbg !28 } @@ -37,7 +37,7 @@ entry: store %struct.s1* %arg, %struct.s1** %arg.addr, align 8, !tbaa !18 call void @llvm.dbg.declare(metadata %struct.s1** %arg.addr, metadata !31, metadata !DIExpression()), !dbg !32 %0 = load %struct.s1*, %struct.s1** %arg.addr, align 8, !dbg !33, !tbaa !18 - %1 = call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %0, i32 0, i32 0), !dbg !34, !llvm.preserve.access.index !12 + %1 = call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %0, i32 0, i32 0), !dbg !34, !llvm.preserve.access.index !12 %2 = load i32, i32* %1, align 4, !dbg !34, !tbaa !25 ret i32 %2, !dbg !35 } diff --git a/test/CodeGen/BPF/CORE/intrinsic-array-2.ll b/test/CodeGen/BPF/CORE/intrinsic-array-2.ll index 7a1a8f7feaf..c2113b31fcb 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-array-2.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-array-2.ll @@ -20,7 +20,7 @@ target triple = "bpf" define dso_local i32 @test() local_unnamed_addr #0 !dbg !17 { entry: call void @llvm.dbg.value(metadata %struct.s1* null, metadata !21, metadata !DIExpression()), !dbg !22 - %0 = tail call %struct.s1* @llvm.preserve.array.access.index.p0s_struct.s1s.p0s_struct.s1s(%struct.s1* null, i32 0, i32 0), !dbg !23, !llvm.preserve.access.index !8 + %0 = tail call %struct.s1* @llvm.preserve.array.access.index.p0s_struct.s1s.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) null, i32 0, i32 0), !dbg !23, !llvm.preserve.access.index !8 %1 = tail call i32 @llvm.bpf.preserve.field.info.p0s_struct.s1s(%struct.s1* %0, i64 2), !dbg !24 ret i32 %1, !dbg !25 } diff --git a/test/CodeGen/BPF/CORE/intrinsic-array.ll b/test/CodeGen/BPF/CORE/intrinsic-array.ll index 57f9ffb1573..d742b18cddc 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-array.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-array.ll @@ -1,6 +1,8 @@ ; RUN: opt -O2 %s | llvm-dis > %t1 ; RUN: llc -filetype=asm -o - %t1 | FileCheck %s ; RUN: llc -mattr=+alu32 -filetype=asm -o - %t1 | FileCheck %s +; RUN: llc -filetype=asm -force-opaque-pointers -o - %t1 | FileCheck %s +; RUN: llc -mattr=+alu32 -filetype=asm -force-opaque-pointers -o - %t1 | FileCheck %s ; ; Source code: ; #define _(x) (__builtin_preserve_access_index(x)) @@ -18,8 +20,8 @@ target triple = "bpf" define dso_local i32 @test(%struct.s* %arg) local_unnamed_addr #0 !dbg !7 { entry: call void @llvm.dbg.value(metadata %struct.s* %arg, metadata !17, metadata !DIExpression()), !dbg !18 - %0 = tail call %struct.s* @llvm.preserve.array.access.index.p0s_struct.ss.p0s_struct.ss(%struct.s* %arg, i32 0, i32 2), !dbg !19, !llvm.preserve.access.index !11 - %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* %0, i32 1, i32 1), !dbg !19, !llvm.preserve.access.index !12 + %0 = tail call %struct.s* @llvm.preserve.array.access.index.p0s_struct.ss.p0s_struct.ss(%struct.s* elementtype(%struct.s) %arg, i32 0, i32 2), !dbg !19, !llvm.preserve.access.index !11 + %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* elementtype(%struct.s) %0, i32 1, i32 1), !dbg !19, !llvm.preserve.access.index !12 %2 = bitcast i32* %1 to i8*, !dbg !19 %call = tail call i32 @get_value(i8* %2) #4, !dbg !20 ret i32 %call, !dbg !21 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-1.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-1.ll index b3138ce51e4..4c5d9071df7 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-1.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-1.ll @@ -27,16 +27,16 @@ entry: call void @llvm.dbg.value(metadata %union.u1* %arg, metadata !28, metadata !DIExpression()), !dbg !33 %0 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg, i32 1), !dbg !34, !llvm.preserve.access.index !16 %b2 = bitcast %union.u1* %0 to %struct.s1*, !dbg !34 - %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 0), !dbg !35, !llvm.preserve.access.index !21 + %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 0), !dbg !35, !llvm.preserve.access.index !21 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %1, i64 1), !dbg !36 call void @llvm.dbg.value(metadata i32 %2, metadata !29, metadata !DIExpression()), !dbg !33 - %3 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 1), !dbg !37, !llvm.preserve.access.index !21 + %3 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 1), !dbg !37, !llvm.preserve.access.index !21 %4 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %3, i64 1), !dbg !38 call void @llvm.dbg.value(metadata i32 %4, metadata !30, metadata !DIExpression()), !dbg !33 - %5 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 2), !dbg !39, !llvm.preserve.access.index !21 + %5 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 2), !dbg !39, !llvm.preserve.access.index !21 %6 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %5, i64 1), !dbg !40 call void @llvm.dbg.value(metadata i32 %6, metadata !31, metadata !DIExpression()), !dbg !33 - %7 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 3), !dbg !41, !llvm.preserve.access.index !21 + %7 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 3), !dbg !41, !llvm.preserve.access.index !21 %8 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %7, i64 1), !dbg !42 call void @llvm.dbg.value(metadata i32 %8, metadata !32, metadata !DIExpression()), !dbg !33 %add = add i32 %4, %2, !dbg !43 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-2.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-2.ll index e978617a547..0eb4e503eb7 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-2.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-2.ll @@ -28,10 +28,10 @@ entry: %b2 = getelementptr inbounds %union.u1, %union.u1* %0, i64 0, i32 0, !dbg !32 %1 = tail call i32 @llvm.bpf.preserve.field.info.p0s_struct.s1s(%struct.s1* %b2, i64 1), !dbg !33 call void @llvm.dbg.value(metadata i32 %1, metadata !28, metadata !DIExpression()), !dbg !31 - %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 0), !dbg !34, !llvm.preserve.access.index !21 + %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 0), !dbg !34, !llvm.preserve.access.index !21 %3 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %2, i64 1), !dbg !35 call void @llvm.dbg.value(metadata i32 %3, metadata !29, metadata !DIExpression()), !dbg !31 - %4 = tail call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.s1s(%struct.s1* %b2, i32 1, i32 1), !dbg !36, !llvm.preserve.access.index !21 + %4 = tail call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 1, i32 1), !dbg !36, !llvm.preserve.access.index !21 %5 = tail call i32 @llvm.bpf.preserve.field.info.p0i8(i8* %4, i64 1), !dbg !37 call void @llvm.dbg.value(metadata i32 %5, metadata !30, metadata !DIExpression()), !dbg !31 %add = add i32 %3, %1, !dbg !38 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-3.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-3.ll index 9106af70cd5..dc2554370f9 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-3.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-3.ll @@ -25,11 +25,11 @@ entry: call void @llvm.dbg.value(metadata %union.u1* %arg, metadata !31, metadata !DIExpression()), !dbg !34 %0 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg, i32 1), !dbg !35, !llvm.preserve.access.index !22 %b2 = getelementptr inbounds %union.u1, %union.u1* %0, i64 0, i32 0, !dbg !35 - %1 = tail call [10 x [10 x i32]]* @llvm.preserve.struct.access.index.p0a10a10i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 0), !dbg !36, !llvm.preserve.access.index !27 - %2 = tail call [10 x i32]* @llvm.preserve.array.access.index.p0a10i32.p0a10a10i32([10 x [10 x i32]]* %1, i32 1, i32 5), !dbg !37, !llvm.preserve.access.index !8 + %1 = tail call [10 x [10 x i32]]* @llvm.preserve.struct.access.index.p0a10a10i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 0), !dbg !36, !llvm.preserve.access.index !27 + %2 = tail call [10 x i32]* @llvm.preserve.array.access.index.p0a10i32.p0a10a10i32([10 x [10 x i32]]* elementtype([10 x [10 x i32]]) %1, i32 1, i32 5), !dbg !37, !llvm.preserve.access.index !8 %3 = tail call i32 @llvm.bpf.preserve.field.info.p0a10i32([10 x i32]* %2, i64 1), !dbg !38 call void @llvm.dbg.value(metadata i32 %3, metadata !32, metadata !DIExpression()), !dbg !34 - %4 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a10i32([10 x i32]* %2, i32 1, i32 5), !dbg !39, !llvm.preserve.access.index !12 + %4 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a10i32([10 x i32]* elementtype([10 x i32]) %2, i32 1, i32 5), !dbg !39, !llvm.preserve.access.index !12 %5 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %4, i64 1), !dbg !40 call void @llvm.dbg.value(metadata i32 %5, metadata !33, metadata !DIExpression()), !dbg !34 %add = add i32 %5, %3, !dbg !41 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-4.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-4.ll index 85af62366a8..0b243ef76d3 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-4.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-byte-size-4.ll @@ -18,7 +18,7 @@ target triple = "bpf" define dso_local i32 @test(%struct.s1* readnone %arg) local_unnamed_addr #0 !dbg !11 { entry: call void @llvm.dbg.value(metadata %struct.s1* %arg, metadata !23, metadata !DIExpression()), !dbg !24 - %0 = tail call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.s1s(%struct.s1* %arg, i32 1, i32 1), !dbg !25, !llvm.preserve.access.index !17 + %0 = tail call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %arg, i32 1, i32 1), !dbg !25, !llvm.preserve.access.index !17 %1 = tail call i32 @llvm.bpf.preserve.field.info.p0i8(i8* %0, i64 1), !dbg !26 ret i32 %1, !dbg !27 } diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-1.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-1.ll index bd826e3f6a0..7fa1e3ed2af 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-1.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-1.ll @@ -26,17 +26,17 @@ define dso_local i32 @test(%struct.s1* %arg1, %union.u1* %arg2) local_unnamed_ad entry: call void @llvm.dbg.value(metadata %struct.s1* %arg1, metadata !29, metadata !DIExpression()), !dbg !35 call void @llvm.dbg.value(metadata %union.u1* %arg2, metadata !30, metadata !DIExpression()), !dbg !35 - %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %arg1, i32 0, i32 0), !dbg !36, !llvm.preserve.access.index !16 + %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %arg1, i32 0, i32 0), !dbg !36, !llvm.preserve.access.index !16 %1 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %0, i64 2), !dbg !37 call void @llvm.dbg.value(metadata i32 %1, metadata !31, metadata !DIExpression()), !dbg !35 - %2 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.s1s(%struct.s1* %arg1, i32 1, i32 2), !dbg !38, !llvm.preserve.access.index !16 + %2 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %arg1, i32 1, i32 2), !dbg !38, !llvm.preserve.access.index !16 %3 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %2, i64 2), !dbg !39 call void @llvm.dbg.value(metadata i32 %3, metadata !32, metadata !DIExpression()), !dbg !35 %4 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg2, i32 0), !dbg !40, !llvm.preserve.access.index !23 %b1 = getelementptr inbounds %union.u1, %union.u1* %4, i64 0, i32 0, !dbg !40 %5 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %b1, i64 2), !dbg !41 call void @llvm.dbg.value(metadata i32 %5, metadata !33, metadata !DIExpression()), !dbg !35 - %6 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_union.u1s(%union.u1* %arg2, i32 0, i32 2), !dbg !42, !llvm.preserve.access.index !23 + %6 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_union.u1s(%union.u1* elementtype(%union.u1) %arg2, i32 0, i32 2), !dbg !42, !llvm.preserve.access.index !23 %7 = bitcast i32* %6 to i8*, !dbg !42 %8 = tail call i32 @llvm.bpf.preserve.field.info.p0i8(i8* %7, i64 2), !dbg !43 call void @llvm.dbg.value(metadata i32 %8, metadata !34, metadata !DIExpression()), !dbg !35 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-2.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-2.ll index 15370df32f3..1d94e7ac14f 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-2.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-2.ll @@ -25,10 +25,10 @@ entry: call void @llvm.dbg.value(metadata %union.u1* %arg, metadata !27, metadata !DIExpression()), !dbg !30 %0 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg, i32 1), !dbg !31, !llvm.preserve.access.index !16 %b2 = getelementptr inbounds %union.u1, %union.u1* %0, i64 0, i32 0, !dbg !31 - %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 0), !dbg !32, !llvm.preserve.access.index !20 + %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 0), !dbg !32, !llvm.preserve.access.index !20 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %1, i64 2), !dbg !33 call void @llvm.dbg.value(metadata i32 %2, metadata !28, metadata !DIExpression()), !dbg !30 - %3 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.s1s(%struct.s1* %b2, i32 1, i32 2), !dbg !34, !llvm.preserve.access.index !20 + %3 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 1, i32 2), !dbg !34, !llvm.preserve.access.index !20 %4 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %3, i64 2), !dbg !35 call void @llvm.dbg.value(metadata i32 %4, metadata !29, metadata !DIExpression()), !dbg !30 %add = add i32 %4, %2, !dbg !36 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-3.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-3.ll index e545a8f4cf2..dffc93555e3 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-3.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-3.ll @@ -24,11 +24,11 @@ entry: call void @llvm.dbg.value(metadata %union.u1* %arg, metadata !31, metadata !DIExpression()), !dbg !34 %0 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg, i32 1), !dbg !35, !llvm.preserve.access.index !22 %b2 = getelementptr inbounds %union.u1, %union.u1* %0, i64 0, i32 0, !dbg !35 - %1 = tail call [10 x [10 x i32]]* @llvm.preserve.struct.access.index.p0a10a10i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 0), !dbg !36, !llvm.preserve.access.index !27 - %2 = tail call [10 x i32]* @llvm.preserve.array.access.index.p0a10i32.p0a10a10i32([10 x [10 x i32]]* %1, i32 1, i32 5), !dbg !37, !llvm.preserve.access.index !8 + %1 = tail call [10 x [10 x i32]]* @llvm.preserve.struct.access.index.p0a10a10i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 0), !dbg !36, !llvm.preserve.access.index !27 + %2 = tail call [10 x i32]* @llvm.preserve.array.access.index.p0a10i32.p0a10a10i32([10 x [10 x i32]]* elementtype([10 x [10 x i32]]) %1, i32 1, i32 5), !dbg !37, !llvm.preserve.access.index !8 %3 = tail call i32 @llvm.bpf.preserve.field.info.p0a10i32([10 x i32]* %2, i64 2), !dbg !38 call void @llvm.dbg.value(metadata i32 %3, metadata !32, metadata !DIExpression()), !dbg !34 - %4 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a10i32([10 x i32]* %2, i32 1, i32 5), !dbg !39, !llvm.preserve.access.index !12 + %4 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a10i32([10 x i32]* elementtype([10 x i32]) %2, i32 1, i32 5), !dbg !39, !llvm.preserve.access.index !12 %5 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %4, i64 2), !dbg !40 call void @llvm.dbg.value(metadata i32 %5, metadata !33, metadata !DIExpression()), !dbg !34 %add = add i32 %5, %3, !dbg !41 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-4.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-4.ll index eb2b649895d..d954e13c830 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-4.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-existence-4.ll @@ -21,7 +21,7 @@ entry: %0 = bitcast %struct.t* %bar to i8*, !dbg !20 call void @llvm.lifetime.start.p0i8(i64 4, i8* %0) #5, !dbg !20 call void @llvm.dbg.declare(metadata %struct.t* %bar, metadata !11, metadata !DIExpression()), !dbg !21 - %1 = call %struct.t* @llvm.preserve.array.access.index.p0s_struct.ts.p0s_struct.ts(%struct.t* %bar, i32 0, i32 1), !dbg !22, !llvm.preserve.access.index !4 + %1 = call %struct.t* @llvm.preserve.array.access.index.p0s_struct.ts.p0s_struct.ts(%struct.t* elementtype(%struct.t) %bar, i32 0, i32 1), !dbg !22, !llvm.preserve.access.index !4 %2 = call i32 @llvm.bpf.preserve.field.info.p0s_struct.ts(%struct.t* %1, i64 2), !dbg !23 %3 = bitcast %struct.t* %bar to i8*, !dbg !24 call void @llvm.lifetime.end.p0i8(i64 4, i8* %3) #5, !dbg !24 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1-bpfeb.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1-bpfeb.ll index 57a1b79bb79..346d8e72808 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1-bpfeb.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1-bpfeb.ll @@ -28,16 +28,16 @@ entry: call void @llvm.dbg.value(metadata %union.u1* %arg, metadata !28, metadata !DIExpression()), !dbg !33 %0 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg, i32 1), !dbg !34, !llvm.preserve.access.index !16 %b2 = bitcast %union.u1* %0 to %struct.s1*, !dbg !34 - %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 0), !dbg !35, !llvm.preserve.access.index !21 + %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 0), !dbg !35, !llvm.preserve.access.index !21 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %1, i64 4), !dbg !36 call void @llvm.dbg.value(metadata i32 %2, metadata !29, metadata !DIExpression()), !dbg !33 - %3 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 1), !dbg !37, !llvm.preserve.access.index !21 + %3 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 1), !dbg !37, !llvm.preserve.access.index !21 %4 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %3, i64 4), !dbg !38 call void @llvm.dbg.value(metadata i32 %4, metadata !30, metadata !DIExpression()), !dbg !33 - %5 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 2), !dbg !39, !llvm.preserve.access.index !21 + %5 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 2), !dbg !39, !llvm.preserve.access.index !21 %6 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %5, i64 4), !dbg !40 call void @llvm.dbg.value(metadata i32 %6, metadata !31, metadata !DIExpression()), !dbg !33 - %7 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 3), !dbg !41, !llvm.preserve.access.index !21 + %7 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 3), !dbg !41, !llvm.preserve.access.index !21 %8 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %7, i64 4), !dbg !42 call void @llvm.dbg.value(metadata i32 %8, metadata !32, metadata !DIExpression()), !dbg !33 %add = add i32 %4, %2, !dbg !43 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1.ll index 239080cbb6b..ffd9f716b0c 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1.ll @@ -28,16 +28,16 @@ entry: call void @llvm.dbg.value(metadata %union.u1* %arg, metadata !28, metadata !DIExpression()), !dbg !33 %0 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg, i32 1), !dbg !34, !llvm.preserve.access.index !16 %b2 = bitcast %union.u1* %0 to %struct.s1*, !dbg !34 - %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 0), !dbg !35, !llvm.preserve.access.index !21 + %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 0), !dbg !35, !llvm.preserve.access.index !21 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %1, i64 4), !dbg !36 call void @llvm.dbg.value(metadata i32 %2, metadata !29, metadata !DIExpression()), !dbg !33 - %3 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 1), !dbg !37, !llvm.preserve.access.index !21 + %3 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 1), !dbg !37, !llvm.preserve.access.index !21 %4 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %3, i64 4), !dbg !38 call void @llvm.dbg.value(metadata i32 %4, metadata !30, metadata !DIExpression()), !dbg !33 - %5 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 2), !dbg !39, !llvm.preserve.access.index !21 + %5 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 2), !dbg !39, !llvm.preserve.access.index !21 %6 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %5, i64 4), !dbg !40 call void @llvm.dbg.value(metadata i32 %6, metadata !31, metadata !DIExpression()), !dbg !33 - %7 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 3), !dbg !41, !llvm.preserve.access.index !21 + %7 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 3), !dbg !41, !llvm.preserve.access.index !21 %8 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %7, i64 4), !dbg !42 call void @llvm.dbg.value(metadata i32 %8, metadata !32, metadata !DIExpression()), !dbg !33 %add = add i32 %4, %2, !dbg !43 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-2.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-2.ll index 090b6226596..9fe96a87e06 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-2.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-2.ll @@ -26,10 +26,10 @@ entry: call void @llvm.dbg.value(metadata %union.u1* %arg, metadata !27, metadata !DIExpression()), !dbg !30 %0 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg, i32 1), !dbg !31, !llvm.preserve.access.index !16 %b2 = getelementptr %union.u1, %union.u1* %0, i64 0, i32 0, !dbg !31 - %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 0), !dbg !32, !llvm.preserve.access.index !21 + %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 0), !dbg !32, !llvm.preserve.access.index !21 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %1, i64 4), !dbg !33 call void @llvm.dbg.value(metadata i32 %2, metadata !28, metadata !DIExpression()), !dbg !30 - %3 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.s1s(%struct.s1* %b2, i32 1, i32 1), !dbg !34, !llvm.preserve.access.index !21 + %3 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 1, i32 1), !dbg !34, !llvm.preserve.access.index !21 %4 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %3, i64 4), !dbg !35 call void @llvm.dbg.value(metadata i32 %4, metadata !29, metadata !DIExpression()), !dbg !30 %add = add i32 %4, %2, !dbg !36 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-1.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-1.ll index 4cd7b34fb23..46ae2c793f0 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-1.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-1.ll @@ -27,16 +27,16 @@ entry: call void @llvm.dbg.value(metadata %union.u1* %arg, metadata !28, metadata !DIExpression()), !dbg !33 %0 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg, i32 1), !dbg !34, !llvm.preserve.access.index !16 %b2 = bitcast %union.u1* %0 to %struct.s1*, !dbg !34 - %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 0), !dbg !35, !llvm.preserve.access.index !21 + %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 0), !dbg !35, !llvm.preserve.access.index !21 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %1, i64 5), !dbg !36 call void @llvm.dbg.value(metadata i32 %2, metadata !29, metadata !DIExpression()), !dbg !33 - %3 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 1), !dbg !37, !llvm.preserve.access.index !21 + %3 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 1), !dbg !37, !llvm.preserve.access.index !21 %4 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %3, i64 5), !dbg !38 call void @llvm.dbg.value(metadata i32 %4, metadata !30, metadata !DIExpression()), !dbg !33 - %5 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 2), !dbg !39, !llvm.preserve.access.index !21 + %5 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 2), !dbg !39, !llvm.preserve.access.index !21 %6 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %5, i64 5), !dbg !40 call void @llvm.dbg.value(metadata i32 %6, metadata !31, metadata !DIExpression()), !dbg !33 - %7 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 3), !dbg !41, !llvm.preserve.access.index !21 + %7 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 3), !dbg !41, !llvm.preserve.access.index !21 %8 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %7, i64 5), !dbg !42 call void @llvm.dbg.value(metadata i32 %8, metadata !32, metadata !DIExpression()), !dbg !33 %add = add i32 %4, %2, !dbg !43 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-2.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-2.ll index 648a873c530..426341b365e 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-2.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-2.ll @@ -25,10 +25,10 @@ entry: call void @llvm.dbg.value(metadata %union.u1* %arg, metadata !27, metadata !DIExpression()), !dbg !30 %0 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg, i32 1), !dbg !31, !llvm.preserve.access.index !16 %b2 = getelementptr inbounds %union.u1, %union.u1* %0, i64 0, i32 0, !dbg !31 - %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 0), !dbg !32, !llvm.preserve.access.index !21 + %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 0), !dbg !32, !llvm.preserve.access.index !21 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %1, i64 5), !dbg !33 call void @llvm.dbg.value(metadata i32 %2, metadata !28, metadata !DIExpression()), !dbg !30 - %3 = tail call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.s1s(%struct.s1* %b2, i32 1, i32 1), !dbg !34, !llvm.preserve.access.index !21 + %3 = tail call i8* @llvm.preserve.struct.access.index.p0i8.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 1, i32 1), !dbg !34, !llvm.preserve.access.index !21 %4 = tail call i32 @llvm.bpf.preserve.field.info.p0i8(i8* %3, i64 5), !dbg !35 call void @llvm.dbg.value(metadata i32 %4, metadata !29, metadata !DIExpression()), !dbg !30 %add = add i32 %4, %2, !dbg !36 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-3.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-3.ll index 0d159ae35f6..966d5947e31 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-3.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-rshift-3.ll @@ -25,11 +25,11 @@ entry: call void @llvm.dbg.value(metadata %union.u1* %arg, metadata !32, metadata !DIExpression()), !dbg !35 %0 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg, i32 1), !dbg !36, !llvm.preserve.access.index !23 %b2 = bitcast %union.u1* %0 to %struct.s1*, !dbg !36 - %1 = tail call [5 x [5 x i8]]* @llvm.preserve.struct.access.index.p0a5a5i8.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 0), !dbg !37, !llvm.preserve.access.index !28 - %2 = tail call [5 x i8]* @llvm.preserve.array.access.index.p0a5i8.p0a5a5i8([5 x [5 x i8]]* %1, i32 1, i32 3), !dbg !38, !llvm.preserve.access.index !8 + %1 = tail call [5 x [5 x i8]]* @llvm.preserve.struct.access.index.p0a5a5i8.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 0), !dbg !37, !llvm.preserve.access.index !28 + %2 = tail call [5 x i8]* @llvm.preserve.array.access.index.p0a5i8.p0a5a5i8([5 x [5 x i8]]* elementtype([5 x [5 x i8]]) %1, i32 1, i32 3), !dbg !38, !llvm.preserve.access.index !8 %3 = tail call i32 @llvm.bpf.preserve.field.info.p0a5i8([5 x i8]* %2, i64 5), !dbg !39 call void @llvm.dbg.value(metadata i32 %3, metadata !33, metadata !DIExpression()), !dbg !35 - %4 = tail call i8* @llvm.preserve.array.access.index.p0i8.p0a5i8([5 x i8]* %2, i32 1, i32 3), !dbg !40, !llvm.preserve.access.index !12 + %4 = tail call i8* @llvm.preserve.array.access.index.p0i8.p0a5i8([5 x i8]* elementtype([5 x i8]) %2, i32 1, i32 3), !dbg !40, !llvm.preserve.access.index !12 %5 = tail call i32 @llvm.bpf.preserve.field.info.p0i8(i8* %4, i64 5), !dbg !41 call void @llvm.dbg.value(metadata i32 %5, metadata !34, metadata !DIExpression()), !dbg !35 %add = add i32 %5, %3, !dbg !42 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-1.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-1.ll index ea46ccfde5e..750c926c421 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-1.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-1.ll @@ -26,17 +26,17 @@ define dso_local i32 @test(%struct.s1* %arg1, %union.u1* %arg2) local_unnamed_ad entry: call void @llvm.dbg.value(metadata %struct.s1* %arg1, metadata !29, metadata !DIExpression()), !dbg !35 call void @llvm.dbg.value(metadata %union.u1* %arg2, metadata !30, metadata !DIExpression()), !dbg !35 - %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %arg1, i32 0, i32 0), !dbg !36, !llvm.preserve.access.index !16 + %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %arg1, i32 0, i32 0), !dbg !36, !llvm.preserve.access.index !16 %1 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %0, i64 3), !dbg !37 call void @llvm.dbg.value(metadata i32 %1, metadata !31, metadata !DIExpression()), !dbg !35 - %2 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.s1s(%struct.s1* %arg1, i32 1, i32 2), !dbg !38, !llvm.preserve.access.index !16 + %2 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %arg1, i32 1, i32 2), !dbg !38, !llvm.preserve.access.index !16 %3 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %2, i64 3), !dbg !39 call void @llvm.dbg.value(metadata i32 %3, metadata !32, metadata !DIExpression()), !dbg !35 %4 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg2, i32 0), !dbg !40, !llvm.preserve.access.index !23 %b1 = getelementptr inbounds %union.u1, %union.u1* %4, i64 0, i32 0, !dbg !40 %5 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %b1, i64 3), !dbg !41 call void @llvm.dbg.value(metadata i32 %5, metadata !33, metadata !DIExpression()), !dbg !35 - %6 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_union.u1s(%union.u1* %arg2, i32 0, i32 2), !dbg !42, !llvm.preserve.access.index !23 + %6 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_union.u1s(%union.u1* elementtype(%union.u1) %arg2, i32 0, i32 2), !dbg !42, !llvm.preserve.access.index !23 %7 = bitcast i32* %6 to i8*, !dbg !42 %8 = tail call i32 @llvm.bpf.preserve.field.info.p0i8(i8* %7, i64 3), !dbg !43 call void @llvm.dbg.value(metadata i32 %8, metadata !34, metadata !DIExpression()), !dbg !35 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-2.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-2.ll index 1993001de8c..a066d74dbc7 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-2.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-2.ll @@ -30,13 +30,13 @@ entry: call void @llvm.dbg.value(metadata %union.u1* %arg, metadata !37, metadata !DIExpression()), !dbg !41 %0 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg, i32 1), !dbg !42, !llvm.preserve.access.index !24 %b2 = getelementptr inbounds %union.u1, %union.u1* %0, i64 0, i32 0, !dbg !42 - %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 0), !dbg !43, !llvm.preserve.access.index !28 + %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 0), !dbg !43, !llvm.preserve.access.index !28 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %1, i64 3), !dbg !44 call void @llvm.dbg.value(metadata i32 %2, metadata !38, metadata !DIExpression()), !dbg !41 - %3 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.s1s(%struct.s1* %b2, i32 1, i32 1), !dbg !45, !llvm.preserve.access.index !28 + %3 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 1, i32 1), !dbg !45, !llvm.preserve.access.index !28 %4 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %3, i64 3), !dbg !46 call void @llvm.dbg.value(metadata i32 %4, metadata !39, metadata !DIExpression()), !dbg !41 - %5 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.s1s(%struct.s1* %b2, i32 1, i32 2), !dbg !47, !llvm.preserve.access.index !28 + %5 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 1, i32 2), !dbg !47, !llvm.preserve.access.index !28 %6 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %5, i64 3), !dbg !48 call void @llvm.dbg.value(metadata i32 %6, metadata !40, metadata !DIExpression()), !dbg !41 %add = add i32 %4, %2, !dbg !49 diff --git a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-3.ll b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-3.ll index 91525136194..ea9e3d088f3 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-3.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-signedness-3.ll @@ -29,13 +29,13 @@ entry: call void @llvm.dbg.value(metadata %union.u1* %arg, metadata !43, metadata !DIExpression()), !dbg !46 %0 = tail call %union.u1* @llvm.preserve.union.access.index.p0s_union.u1s.p0s_union.u1s(%union.u1* %arg, i32 1), !dbg !47, !llvm.preserve.access.index !33 %b2 = getelementptr inbounds %union.u1, %union.u1* %0, i64 0, i32 0, !dbg !47 - %1 = tail call [10 x i32]* @llvm.preserve.struct.access.index.p0a10i32.p0s_struct.s1s(%struct.s1* %b2, i32 0, i32 0), !dbg !48, !llvm.preserve.access.index !38 - %2 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a10i32([10 x i32]* %1, i32 1, i32 5), !dbg !49, !llvm.preserve.access.index !17 + %1 = tail call [10 x i32]* @llvm.preserve.struct.access.index.p0a10i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 0, i32 0), !dbg !48, !llvm.preserve.access.index !38 + %2 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a10i32([10 x i32]* elementtype([10 x i32]) %1, i32 1, i32 5), !dbg !49, !llvm.preserve.access.index !17 %3 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %2, i64 3), !dbg !50 call void @llvm.dbg.value(metadata i32 %3, metadata !44, metadata !DIExpression()), !dbg !46 - %4 = tail call [10 x [10 x i32]]* @llvm.preserve.struct.access.index.p0a10a10i32.p0s_struct.s1s(%struct.s1* %b2, i32 1, i32 1), !dbg !51, !llvm.preserve.access.index !38 - %5 = tail call [10 x i32]* @llvm.preserve.array.access.index.p0a10i32.p0a10a10i32([10 x [10 x i32]]* %4, i32 1, i32 5), !dbg !52, !llvm.preserve.access.index !21 - %6 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a10i32([10 x i32]* %5, i32 1, i32 5), !dbg !52, !llvm.preserve.access.index !24 + %4 = tail call [10 x [10 x i32]]* @llvm.preserve.struct.access.index.p0a10a10i32.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %b2, i32 1, i32 1), !dbg !51, !llvm.preserve.access.index !38 + %5 = tail call [10 x i32]* @llvm.preserve.array.access.index.p0a10i32.p0a10a10i32([10 x [10 x i32]]* elementtype([10 x [10 x i32]]) %4, i32 1, i32 5), !dbg !52, !llvm.preserve.access.index !21 + %6 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a10i32([10 x i32]* elementtype([10 x i32]) %5, i32 1, i32 5), !dbg !52, !llvm.preserve.access.index !24 %7 = tail call i32 @llvm.bpf.preserve.field.info.p0i32(i32* %6, i64 3), !dbg !53 call void @llvm.dbg.value(metadata i32 %7, metadata !45, metadata !DIExpression()), !dbg !46 %add = add i32 %7, %3, !dbg !54 diff --git a/test/CodeGen/BPF/CORE/intrinsic-struct.ll b/test/CodeGen/BPF/CORE/intrinsic-struct.ll index 43db101d0dd..1a8d0da813a 100644 --- a/test/CodeGen/BPF/CORE/intrinsic-struct.ll +++ b/test/CodeGen/BPF/CORE/intrinsic-struct.ll @@ -18,7 +18,7 @@ target triple = "bpf" define dso_local i32 @test(%struct.s* %arg) local_unnamed_addr #0 !dbg !7 { entry: call void @llvm.dbg.value(metadata %struct.s* %arg, metadata !17, metadata !DIExpression()), !dbg !18 - %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* %arg, i32 1, i32 1), !dbg !19, !llvm.preserve.access.index !12 + %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* elementtype(%struct.s) %arg, i32 1, i32 1), !dbg !19, !llvm.preserve.access.index !12 %1 = bitcast i32* %0 to i8*, !dbg !19 %call = tail call i32 @get_value(i8* %1) #4, !dbg !20 ret i32 %call, !dbg !21 diff --git a/test/CodeGen/BPF/CORE/no-elf-ama-symbol.ll b/test/CodeGen/BPF/CORE/no-elf-ama-symbol.ll index 5cbf3ffe93f..a080146ffaa 100644 --- a/test/CodeGen/BPF/CORE/no-elf-ama-symbol.ll +++ b/test/CodeGen/BPF/CORE/no-elf-ama-symbol.ll @@ -18,7 +18,7 @@ target triple = "bpf" define dso_local i32 @test(%struct.tt* readonly %arg) local_unnamed_addr #0 !dbg !7 { entry: call void @llvm.dbg.value(metadata %struct.tt* %arg, metadata !16, metadata !DIExpression()), !dbg !17 - %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.tts(%struct.tt* %arg, i32 0, i32 0), !dbg !18, !llvm.preserve.access.index !12 + %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.tts(%struct.tt* elementtype(%struct.tt) %arg, i32 0, i32 0), !dbg !18, !llvm.preserve.access.index !12 %1 = load i32, i32* %0, align 4, !dbg !18, !tbaa !19 ret i32 %1, !dbg !24 } diff --git a/test/CodeGen/BPF/CORE/no-narrow-load.ll b/test/CodeGen/BPF/CORE/no-narrow-load.ll index 8c44bb72d02..c9fd74e8677 100644 --- a/test/CodeGen/BPF/CORE/no-narrow-load.ll +++ b/test/CodeGen/BPF/CORE/no-narrow-load.ll @@ -33,7 +33,7 @@ entry: %data = alloca i64, align 8 %tmpcast = bitcast i64* %data to %struct.data_t* call void @llvm.dbg.value(metadata %struct.info_t* %args, metadata !22, metadata !DIExpression()), !dbg !29 - %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.info_ts(%struct.info_t* %args, i32 1, i32 1), !dbg !30, !llvm.preserve.access.index !16 + %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.info_ts(%struct.info_t* elementtype(%struct.info_t) %args, i32 1, i32 1), !dbg !30, !llvm.preserve.access.index !16 %1 = load i32, i32* %0, align 4, !dbg !30, !tbaa !31 %and = and i32 %1, 65536, !dbg !36 call void @llvm.dbg.value(metadata i32 %and, metadata !23, metadata !DIExpression()), !dbg !29 @@ -45,7 +45,7 @@ entry: br i1 %tobool, label %cond.false, label %lor.end.critedge, !dbg !39 cond.false: ; preds = %entry - %3 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.info_ts(%struct.info_t* %args, i32 0, i32 0), !dbg !40, !llvm.preserve.access.index !16 + %3 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.info_ts(%struct.info_t* elementtype(%struct.info_t) %args, i32 0, i32 0), !dbg !40, !llvm.preserve.access.index !16 %4 = load i32, i32* %3, align 4, !dbg !40, !tbaa !41 %d1 = bitcast i64* %data to i32*, !dbg !42 store i32 %4, i32* %d1, align 8, !dbg !43, !tbaa !44 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-access-str.ll b/test/CodeGen/BPF/CORE/offset-reloc-access-str.ll index 52c043ab90c..7b94918cf33 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-access-str.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-access-str.ll @@ -22,9 +22,9 @@ define dso_local i32 @test(%struct.s* %arg1, %struct.t* %arg2) local_unnamed_add entry: call void @llvm.dbg.value(metadata %struct.s* %arg1, metadata !22, metadata !DIExpression()), !dbg !24 call void @llvm.dbg.value(metadata %struct.t* %arg2, metadata !23, metadata !DIExpression()), !dbg !24 - %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* %arg1, i32 1, i32 1), !dbg !25, !llvm.preserve.access.index !12 + %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* elementtype(%struct.s) %arg1, i32 1, i32 1), !dbg !25, !llvm.preserve.access.index !12 %1 = bitcast i32* %0 to i8*, !dbg !25 - %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ts(%struct.t* %arg2, i32 1, i32 1), !dbg !26, !llvm.preserve.access.index !17 + %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ts(%struct.t* elementtype(%struct.t) %arg2, i32 1, i32 1), !dbg !26, !llvm.preserve.access.index !17 %3 = bitcast i32* %2 to i8*, !dbg !26 %call = tail call i32 @get_value(i8* %1, i8* %3) #4, !dbg !27 ret i32 %call, !dbg !28 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-basic.ll b/test/CodeGen/BPF/CORE/offset-reloc-basic.ll index d97658ac758..85bd7fa6d5b 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-basic.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-basic.ll @@ -31,7 +31,7 @@ define dso_local i32 @bpf_prog(%struct.sk_buff*) local_unnamed_addr #0 !dbg !15 call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %3) #4, !dbg !29 call void @llvm.dbg.value(metadata %struct.net_device* null, metadata !27, metadata !DIExpression()), !dbg !28 store %struct.net_device* null, %struct.net_device** %2, align 8, !dbg !30, !tbaa !31 - %4 = tail call %struct.net_device** @llvm.preserve.struct.access.index.p0p0s_struct.net_devices.p0s_struct.sk_buffs(%struct.sk_buff* %0, i32 1, i32 1), !dbg !35, !llvm.preserve.access.index !19 + %4 = tail call %struct.net_device** @llvm.preserve.struct.access.index.p0p0s_struct.net_devices.p0s_struct.sk_buffs(%struct.sk_buff* elementtype(%struct.sk_buff) %0, i32 1, i32 1), !dbg !35, !llvm.preserve.access.index !19 %5 = bitcast %struct.net_device** %4 to i8*, !dbg !35 %6 = call i32 inttoptr (i64 4 to i32 (i8*, i32, i8*)*)(i8* nonnull %3, i32 8, i8* %5) #4, !dbg !36 %7 = load %struct.net_device*, %struct.net_device** %2, align 8, !dbg !37, !tbaa !31 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-cast-array-1.ll b/test/CodeGen/BPF/CORE/offset-reloc-cast-array-1.ll index 8c1fcbdd901..8a0a461698c 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-cast-array-1.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-cast-array-1.ll @@ -24,12 +24,12 @@ target triple = "bpf" define dso_local i32 @test(%struct.v3* %arg) local_unnamed_addr #0 !dbg !22 { entry: call void @llvm.dbg.value(metadata %struct.v3* %arg, metadata !32, metadata !DIExpression()), !dbg !33 - %0 = tail call [100 x i32]* @llvm.preserve.struct.access.index.p0a100i32.p0s_struct.v3s(%struct.v3* %arg, i32 1, i32 1), !dbg !34, !llvm.preserve.access.index !26 - %1 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a100i32([100 x i32]* %0, i32 1, i32 0), !dbg !34, !llvm.preserve.access.index !15 + %0 = tail call [100 x i32]* @llvm.preserve.struct.access.index.p0a100i32.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %arg, i32 1, i32 1), !dbg !34, !llvm.preserve.access.index !26 + %1 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a100i32([100 x i32]* elementtype([100 x i32]) %0, i32 1, i32 0), !dbg !34, !llvm.preserve.access.index !15 %2 = bitcast i32* %1 to [4 x %struct.v1]*, !dbg !34 - %3 = tail call [4 x %struct.v1]* @llvm.preserve.array.access.index.p0a4s_struct.v1s.p0a4s_struct.v1s([4 x %struct.v1]* %2, i32 0, i32 0), !dbg !34, !llvm.preserve.access.index !4 - %4 = tail call %struct.v1* @llvm.preserve.array.access.index.p0s_struct.v1s.p0a4s_struct.v1s([4 x %struct.v1]* %3, i32 1, i32 2), !dbg !34, !llvm.preserve.access.index !5 - %5 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v1s(%struct.v1* %4, i32 1, i32 1), !dbg !34, !llvm.preserve.access.index !8 + %3 = tail call [4 x %struct.v1]* @llvm.preserve.array.access.index.p0a4s_struct.v1s.p0a4s_struct.v1s([4 x %struct.v1]* elementtype([4 x %struct.v1]) %2, i32 0, i32 0), !dbg !34, !llvm.preserve.access.index !4 + %4 = tail call %struct.v1* @llvm.preserve.array.access.index.p0s_struct.v1s.p0a4s_struct.v1s([4 x %struct.v1]* elementtype([4 x %struct.v1]) %3, i32 1, i32 2), !dbg !34, !llvm.preserve.access.index !5 + %5 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v1s(%struct.v1* elementtype(%struct.v1) %4, i32 1, i32 1), !dbg !34, !llvm.preserve.access.index !8 %call = tail call i32 @get_value(i32* %5) #4, !dbg !35 ret i32 %call, !dbg !36 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-cast-array-2.ll b/test/CodeGen/BPF/CORE/offset-reloc-cast-array-2.ll index 68eaa881f7c..e3b053f1725 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-cast-array-2.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-cast-array-2.ll @@ -24,13 +24,13 @@ target triple = "bpf" define dso_local i32 @test(%struct.v3* %arg) local_unnamed_addr #0 !dbg !24 { entry: call void @llvm.dbg.value(metadata %struct.v3* %arg, metadata !34, metadata !DIExpression()), !dbg !35 - %0 = tail call [100 x i32]* @llvm.preserve.struct.access.index.p0a100i32.p0s_struct.v3s(%struct.v3* %arg, i32 1, i32 1), !dbg !36, !llvm.preserve.access.index !28 - %1 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a100i32([100 x i32]* %0, i32 1, i32 0), !dbg !36, !llvm.preserve.access.index !15 + %0 = tail call [100 x i32]* @llvm.preserve.struct.access.index.p0a100i32.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %arg, i32 1, i32 1), !dbg !36, !llvm.preserve.access.index !28 + %1 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a100i32([100 x i32]* elementtype([100 x i32]) %0, i32 1, i32 0), !dbg !36, !llvm.preserve.access.index !15 %2 = bitcast i32* %1 to [4 x [4 x %struct.v1]]*, !dbg !36 - %3 = tail call [4 x [4 x %struct.v1]]* @llvm.preserve.array.access.index.p0a4a4s_struct.v1s.p0a4a4s_struct.v1s([4 x [4 x %struct.v1]]* %2, i32 0, i32 0), !dbg !36, !llvm.preserve.access.index !4 - %4 = tail call [4 x %struct.v1]* @llvm.preserve.array.access.index.p0a4s_struct.v1s.p0a4a4s_struct.v1s([4 x [4 x %struct.v1]]* %3, i32 1, i32 2), !dbg !36, !llvm.preserve.access.index !5 - %5 = tail call %struct.v1* @llvm.preserve.array.access.index.p0s_struct.v1s.p0a4s_struct.v1s([4 x %struct.v1]* %4, i32 1, i32 3), !dbg !36, !llvm.preserve.access.index !18 - %6 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v1s(%struct.v1* %5, i32 1, i32 1), !dbg !36, !llvm.preserve.access.index !8 + %3 = tail call [4 x [4 x %struct.v1]]* @llvm.preserve.array.access.index.p0a4a4s_struct.v1s.p0a4a4s_struct.v1s([4 x [4 x %struct.v1]]* elementtype([4 x [4 x %struct.v1]]) %2, i32 0, i32 0), !dbg !36, !llvm.preserve.access.index !4 + %4 = tail call [4 x %struct.v1]* @llvm.preserve.array.access.index.p0a4s_struct.v1s.p0a4a4s_struct.v1s([4 x [4 x %struct.v1]]* elementtype([4 x [4 x %struct.v1]]) %3, i32 1, i32 2), !dbg !36, !llvm.preserve.access.index !5 + %5 = tail call %struct.v1* @llvm.preserve.array.access.index.p0s_struct.v1s.p0a4s_struct.v1s([4 x %struct.v1]* elementtype([4 x %struct.v1]) %4, i32 1, i32 3), !dbg !36, !llvm.preserve.access.index !18 + %6 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v1s(%struct.v1* elementtype(%struct.v1) %5, i32 1, i32 1), !dbg !36, !llvm.preserve.access.index !8 %call = tail call i32 @get_value(i32* %6) #4, !dbg !37 ret i32 %call, !dbg !38 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-1.ll b/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-1.ll index 4b8759bd130..bf0730c4a74 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-1.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-1.ll @@ -24,9 +24,9 @@ target triple = "bpf" define dso_local i32 @test(%struct.v3* %arg) local_unnamed_addr #0 !dbg !14 { entry: call void @llvm.dbg.value(metadata %struct.v3* %arg, metadata !28, metadata !DIExpression()), !dbg !29 - %0 = tail call %struct.v2* @llvm.preserve.struct.access.index.p0s_struct.v2s.p0s_struct.v3s(%struct.v3* %arg, i32 1, i32 1), !dbg !30, !llvm.preserve.access.index !18 + %0 = tail call %struct.v2* @llvm.preserve.struct.access.index.p0s_struct.v2s.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %arg, i32 1, i32 1), !dbg !30, !llvm.preserve.access.index !18 %1 = bitcast %struct.v2* %0 to %struct.v1*, !dbg !30 - %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v1s(%struct.v1* %1, i32 1, i32 1), !dbg !30, !llvm.preserve.access.index !5 + %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v1s(%struct.v1* elementtype(%struct.v1) %1, i32 1, i32 1), !dbg !30, !llvm.preserve.access.index !5 %call = tail call i32 @get_value(i32* %2) #4, !dbg !31 ret i32 %call, !dbg !32 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-2.ll b/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-2.ll index a8b04ea422a..eb396cf8903 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-2.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-2.ll @@ -27,9 +27,9 @@ target triple = "bpf" define dso_local i32 @test(%struct.v3* %arg) local_unnamed_addr #0 !dbg !15 { entry: call void @llvm.dbg.value(metadata %struct.v3* %arg, metadata !33, metadata !DIExpression()), !dbg !34 - %0 = tail call %struct.v2* @llvm.preserve.struct.access.index.p0s_struct.v2s.p0s_struct.v3s(%struct.v3* %arg, i32 1, i32 1), !dbg !35, !llvm.preserve.access.index !20 + %0 = tail call %struct.v2* @llvm.preserve.struct.access.index.p0s_struct.v2s.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %arg, i32 1, i32 1), !dbg !35, !llvm.preserve.access.index !20 %1 = bitcast %struct.v2* %0 to %struct.v1*, !dbg !35 - %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v1s(%struct.v1* %1, i32 1, i32 1), !dbg !35, !llvm.preserve.access.index !6 + %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v1s(%struct.v1* elementtype(%struct.v1) %1, i32 1, i32 1), !dbg !35, !llvm.preserve.access.index !6 %call = tail call i32 @get_value(i32* %2) #4, !dbg !36 ret i32 %call, !dbg !37 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-3.ll b/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-3.ll index f352e45bb21..952183c7393 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-3.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-cast-struct-3.ll @@ -25,10 +25,10 @@ target triple = "bpf" define dso_local i32 @test(%struct.v3* %arg) local_unnamed_addr #0 !dbg !19 { entry: call void @llvm.dbg.value(metadata %struct.v3* %arg, metadata !30, metadata !DIExpression()), !dbg !31 - %0 = tail call [40 x i32]* @llvm.preserve.struct.access.index.p0a40i32.p0s_struct.v3s(%struct.v3* %arg, i32 1, i32 1), !dbg !32, !llvm.preserve.access.index !24 - %1 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a40i32([40 x i32]* %0, i32 1, i32 4), !dbg !32, !llvm.preserve.access.index !11 + %0 = tail call [40 x i32]* @llvm.preserve.struct.access.index.p0a40i32.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %arg, i32 1, i32 1), !dbg !32, !llvm.preserve.access.index !24 + %1 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a40i32([40 x i32]* elementtype([40 x i32]) %0, i32 1, i32 4), !dbg !32, !llvm.preserve.access.index !11 %2 = bitcast i32* %1 to %struct.v1*, !dbg !32 - %3 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v1s(%struct.v1* %2, i32 1, i32 1), !dbg !32, !llvm.preserve.access.index !6 + %3 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v1s(%struct.v1* elementtype(%struct.v1) %2, i32 1, i32 1), !dbg !32, !llvm.preserve.access.index !6 %call = tail call i32 @get_value(i32* %3) #4, !dbg !33 ret i32 %call, !dbg !34 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-cast-union-2.ll b/test/CodeGen/BPF/CORE/offset-reloc-cast-union-2.ll index 8edf73ac7bf..d92df5bf809 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-cast-union-2.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-cast-union-2.ll @@ -27,7 +27,7 @@ entry: call void @llvm.dbg.value(metadata %union.v3* %arg, metadata !30, metadata !DIExpression()), !dbg !31 %0 = tail call %union.v3* @llvm.preserve.union.access.index.p0s_union.v3s.p0s_union.v3s(%union.v3* %arg, i32 1), !dbg !32, !llvm.preserve.access.index !24 %d = getelementptr inbounds %union.v3, %union.v3* %0, i64 0, i32 0, !dbg !32 - %1 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a40i32([40 x i32]* %d, i32 1, i32 4), !dbg !32, !llvm.preserve.access.index !11 + %1 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a40i32([40 x i32]* elementtype([40 x i32]) %d, i32 1, i32 4), !dbg !32, !llvm.preserve.access.index !11 %2 = bitcast i32* %1 to %union.v1*, !dbg !32 %3 = tail call %union.v1* @llvm.preserve.union.access.index.p0s_union.v1s.p0s_union.v1s(%union.v1* %2, i32 1), !dbg !32, !llvm.preserve.access.index !6 %b = getelementptr inbounds %union.v1, %union.v1* %3, i64 0, i32 0, !dbg !32 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-end-load.ll b/test/CodeGen/BPF/CORE/offset-reloc-end-load.ll index 5bb43bf4be5..621f2e8519c 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-end-load.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-end-load.ll @@ -17,7 +17,7 @@ target triple = "bpf" define dso_local i32 @test(%struct.s* readonly %arg) local_unnamed_addr #0 !dbg !11 { entry: call void @llvm.dbg.value(metadata %struct.s* %arg, metadata !20, metadata !DIExpression()), !dbg !21 - %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* %arg, i32 1, i32 1), !dbg !22, !llvm.preserve.access.index !15 + %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* elementtype(%struct.s) %arg, i32 1, i32 1), !dbg !22, !llvm.preserve.access.index !15 %1 = load i32, i32* %0, align 4, !dbg !23, !tbaa !24 ret i32 %1, !dbg !28 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-end-ret.ll b/test/CodeGen/BPF/CORE/offset-reloc-end-ret.ll index 2e134f4a4e2..b2a1b2878e0 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-end-ret.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-end-ret.ll @@ -17,7 +17,7 @@ target triple = "bpf" define dso_local i8* @test(%struct.s* readnone %arg) local_unnamed_addr #0 !dbg !7 { entry: call void @llvm.dbg.value(metadata %struct.s* %arg, metadata !19, metadata !DIExpression()), !dbg !20 - %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* %arg, i32 1, i32 1), !dbg !21, !llvm.preserve.access.index !13 + %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* elementtype(%struct.s) %arg, i32 1, i32 1), !dbg !21, !llvm.preserve.access.index !13 %1 = bitcast i32* %0 to i8*, !dbg !21 ret i8* %1, !dbg !22 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-1.ll b/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-1.ll index 3bbea3b897d..506f9edc5c7 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-1.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-1.ll @@ -46,7 +46,7 @@ entry: call void @llvm.dbg.value(metadata %struct.s* %arg, metadata !31, metadata !DIExpression()), !dbg !37 %0 = bitcast i64* %ull to i8*, !dbg !38 call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %0) #5, !dbg !38 - %1 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.ss(%struct.s* %arg, i32 1, i32 2), !dbg !39, !llvm.preserve.access.index !25 + %1 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.ss(%struct.s* elementtype(%struct.s) %arg, i32 1, i32 2), !dbg !39, !llvm.preserve.access.index !25 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %1, i64 0), !dbg !40 call void @llvm.dbg.value(metadata i32 %2, metadata !34, metadata !DIExpression()), !dbg !37 %3 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %1, i64 1), !dbg !41 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2-bpfeb.ll b/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2-bpfeb.ll index a5f68b5cda9..4cd2b5361f9 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2-bpfeb.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2-bpfeb.ll @@ -45,7 +45,7 @@ target triple = "bpfeb" define dso_local i32 @field_read(%struct.s* %arg) local_unnamed_addr #0 !dbg !26 { entry: call void @llvm.dbg.value(metadata %struct.s* %arg, metadata !37, metadata !DIExpression()), !dbg !41 - %0 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.ss(%struct.s* %arg, i32 1, i32 2), !dbg !42, !llvm.preserve.access.index !31 + %0 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.ss(%struct.s* elementtype(%struct.s) %arg, i32 1, i32 2), !dbg !42, !llvm.preserve.access.index !31 %1 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %0, i64 0), !dbg !43 call void @llvm.dbg.value(metadata i32 %1, metadata !39, metadata !DIExpression()), !dbg !41 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %0, i64 1), !dbg !44 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2.ll b/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2.ll index e0e58b90bd6..81a372ec535 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2.ll @@ -45,7 +45,7 @@ target triple = "bpfel" define dso_local i32 @field_read(%struct.s* %arg) local_unnamed_addr #0 !dbg !26 { entry: call void @llvm.dbg.value(metadata %struct.s* %arg, metadata !37, metadata !DIExpression()), !dbg !41 - %0 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.ss(%struct.s* %arg, i32 1, i32 2), !dbg !42, !llvm.preserve.access.index !31 + %0 = tail call i16* @llvm.preserve.struct.access.index.p0i16.p0s_struct.ss(%struct.s* elementtype(%struct.s) %arg, i32 1, i32 2), !dbg !42, !llvm.preserve.access.index !31 %1 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %0, i64 0), !dbg !43 call void @llvm.dbg.value(metadata i32 %1, metadata !39, metadata !DIExpression()), !dbg !41 %2 = tail call i32 @llvm.bpf.preserve.field.info.p0i16(i16* %0, i64 1), !dbg !44 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-global-1.ll b/test/CodeGen/BPF/CORE/offset-reloc-global-1.ll index 6146187c9cf..1a39e64e014 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-global-1.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-global-1.ll @@ -21,7 +21,7 @@ target triple = "bpf" ; Function Attrs: nounwind define dso_local i32 @test() local_unnamed_addr #0 !dbg !16 { entry: - %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v3s(%struct.v3* nonnull @g, i32 1, i32 1), !dbg !19, !llvm.preserve.access.index !7 + %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) nonnull @g, i32 1, i32 1), !dbg !19, !llvm.preserve.access.index !7 %call = tail call i32 @get_value(i32* %0) #3, !dbg !20 ret i32 %call, !dbg !21 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-global-2.ll b/test/CodeGen/BPF/CORE/offset-reloc-global-2.ll index 812f435a53f..450eb915d5e 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-global-2.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-global-2.ll @@ -21,9 +21,9 @@ target triple = "bpf" ; Function Attrs: nounwind define dso_local i32 @test() local_unnamed_addr #0 !dbg !23 { entry: - %0 = tail call [5 x %struct.v3]* @llvm.preserve.array.access.index.p0a5s_struct.v3s.p0a4a5s_struct.v3s([4 x [5 x %struct.v3]]* nonnull @g, i32 1, i32 1), !dbg !26, !llvm.preserve.access.index !6 - %1 = tail call %struct.v3* @llvm.preserve.array.access.index.p0s_struct.v3s.p0a5s_struct.v3s([5 x %struct.v3]* %0, i32 1, i32 2), !dbg !26, !llvm.preserve.access.index !16 - %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v3s(%struct.v3* %1, i32 1, i32 1), !dbg !26, !llvm.preserve.access.index !8 + %0 = tail call [5 x %struct.v3]* @llvm.preserve.array.access.index.p0a5s_struct.v3s.p0a4a5s_struct.v3s([4 x [5 x %struct.v3]]* elementtype([4 x [5 x %struct.v3]]) nonnull @g, i32 1, i32 1), !dbg !26, !llvm.preserve.access.index !6 + %1 = tail call %struct.v3* @llvm.preserve.array.access.index.p0s_struct.v3s.p0a5s_struct.v3s([5 x %struct.v3]* elementtype([5 x %struct.v3]) %0, i32 1, i32 2), !dbg !26, !llvm.preserve.access.index !16 + %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %1, i32 1, i32 1), !dbg !26, !llvm.preserve.access.index !8 %call = tail call i32 @get_value(i32* %2) #3, !dbg !27 ret i32 %call, !dbg !28 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-global-3.ll b/test/CodeGen/BPF/CORE/offset-reloc-global-3.ll index f921a03035b..80b01a7bfdf 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-global-3.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-global-3.ll @@ -22,7 +22,7 @@ target triple = "bpf" define dso_local i32 @test() local_unnamed_addr #0 !dbg !17 { entry: %0 = load %struct.v3*, %struct.v3** @g, align 8, !dbg !20, !tbaa !21 - %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v3s(%struct.v3* %0, i32 1, i32 1), !dbg !20, !llvm.preserve.access.index !8 + %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %0, i32 1, i32 1), !dbg !20, !llvm.preserve.access.index !8 %call = tail call i32 @get_value(i32* %1) #3, !dbg !25 ret i32 %call, !dbg !26 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-ignore.ll b/test/CodeGen/BPF/CORE/offset-reloc-ignore.ll index 720629fc923..2778382c2c0 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-ignore.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-ignore.ll @@ -16,7 +16,7 @@ target triple = "bpf" define dso_local i32 @test(i32* %arg) local_unnamed_addr #0 !dbg !10 { entry: call void @llvm.dbg.value(metadata i32* %arg, metadata !14, metadata !DIExpression()), !dbg !15 - %0 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0i32(i32* %arg, i32 0, i32 4), !dbg !16, !llvm.preserve.access.index !4 + %0 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0i32(i32* elementtype(i32) %arg, i32 0, i32 4), !dbg !16, !llvm.preserve.access.index !4 %call = tail call i32 @get_value(i32* %0) #4, !dbg !17 ret i32 %call, !dbg !18 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-middle-chain.ll b/test/CodeGen/BPF/CORE/offset-reloc-middle-chain.ll index 6a849fab584..fa2fbeb60d7 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-middle-chain.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-middle-chain.ll @@ -32,11 +32,11 @@ target triple = "bpf" define dso_local void @test(%struct.r1* %arg) local_unnamed_addr #0 !dbg !7 { entry: call void @llvm.dbg.value(metadata %struct.r1* %arg, metadata !22, metadata !DIExpression()), !dbg !29 - %0 = tail call %struct.s1* @llvm.preserve.struct.access.index.p0s_struct.s1s.p0s_struct.r1s(%struct.r1* %arg, i32 0, i32 0), !dbg !30, !llvm.preserve.access.index !11 + %0 = tail call %struct.s1* @llvm.preserve.struct.access.index.p0s_struct.s1s.p0s_struct.r1s(%struct.r1* elementtype(%struct.r1) %arg, i32 0, i32 0), !dbg !30, !llvm.preserve.access.index !11 call void @llvm.dbg.value(metadata %struct.s1* %0, metadata !23, metadata !DIExpression()), !dbg !29 - %1 = tail call %struct.t1* @llvm.preserve.struct.access.index.p0s_struct.t1s.p0s_struct.s1s(%struct.s1* %0, i32 0, i32 0), !dbg !31, !llvm.preserve.access.index !14 + %1 = tail call %struct.t1* @llvm.preserve.struct.access.index.p0s_struct.t1s.p0s_struct.s1s(%struct.s1* elementtype(%struct.s1) %0, i32 0, i32 0), !dbg !31, !llvm.preserve.access.index !14 call void @llvm.dbg.value(metadata %struct.t1* %1, metadata !25, metadata !DIExpression()), !dbg !29 - %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.t1s(%struct.t1* %1, i32 0, i32 0), !dbg !32, !llvm.preserve.access.index !17 + %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.t1s(%struct.t1* elementtype(%struct.t1) %1, i32 0, i32 0), !dbg !32, !llvm.preserve.access.index !17 call void @llvm.dbg.value(metadata i32* %2, metadata !27, metadata !DIExpression()), !dbg !29 %3 = bitcast %struct.s1* %0 to i8*, !dbg !33 %4 = bitcast %struct.t1* %1 to i8*, !dbg !34 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-multi-array-1.ll b/test/CodeGen/BPF/CORE/offset-reloc-multi-array-1.ll index 4e684425331..d5f1484f3bc 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-multi-array-1.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-multi-array-1.ll @@ -20,10 +20,10 @@ target triple = "bpf" define dso_local i32 @test(%struct.v3* %arg) local_unnamed_addr #0 !dbg !21 { entry: call void @llvm.dbg.value(metadata %struct.v3* %arg, metadata !25, metadata !DIExpression()), !dbg !26 - %0 = tail call %struct.v3* @llvm.preserve.array.access.index.p0s_struct.v3s.p0s_struct.v3s(%struct.v3* %arg, i32 0, i32 1), !dbg !27, !llvm.preserve.access.index !4 - %1 = tail call [4 x [4 x i32]]* @llvm.preserve.struct.access.index.p0a4a4i32.p0s_struct.v3s(%struct.v3* %0, i32 1, i32 1), !dbg !27, !llvm.preserve.access.index !6 - %2 = tail call [4 x i32]* @llvm.preserve.array.access.index.p0a4i32.p0a4a4i32([4 x [4 x i32]]* %1, i32 1, i32 2), !dbg !27, !llvm.preserve.access.index !11 - %3 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* %2, i32 1, i32 3), !dbg !27, !llvm.preserve.access.index !15 + %0 = tail call %struct.v3* @llvm.preserve.array.access.index.p0s_struct.v3s.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %arg, i32 0, i32 1), !dbg !27, !llvm.preserve.access.index !4 + %1 = tail call [4 x [4 x i32]]* @llvm.preserve.struct.access.index.p0a4a4i32.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %0, i32 1, i32 1), !dbg !27, !llvm.preserve.access.index !6 + %2 = tail call [4 x i32]* @llvm.preserve.array.access.index.p0a4i32.p0a4a4i32([4 x [4 x i32]]* elementtype([4 x [4 x i32]]) %1, i32 1, i32 2), !dbg !27, !llvm.preserve.access.index !11 + %3 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* elementtype([4 x i32]) %2, i32 1, i32 3), !dbg !27, !llvm.preserve.access.index !15 %call = tail call i32 @get_value(i32* %3) #4, !dbg !28 ret i32 %call, !dbg !29 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-multi-array-2.ll b/test/CodeGen/BPF/CORE/offset-reloc-multi-array-2.ll index d83f2f6f433..99bdbaa51e0 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-multi-array-2.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-multi-array-2.ll @@ -20,11 +20,11 @@ target triple = "bpf" define dso_local i32 @test(%struct.v3* %arg) local_unnamed_addr #0 !dbg !23 { entry: call void @llvm.dbg.value(metadata %struct.v3* %arg, metadata !27, metadata !DIExpression()), !dbg !28 - %0 = tail call %struct.v3* @llvm.preserve.array.access.index.p0s_struct.v3s.p0s_struct.v3s(%struct.v3* %arg, i32 0, i32 1), !dbg !29, !llvm.preserve.access.index !4 - %1 = tail call [4 x [4 x [4 x i32]]]* @llvm.preserve.struct.access.index.p0a4a4a4i32.p0s_struct.v3s(%struct.v3* %0, i32 1, i32 1), !dbg !29, !llvm.preserve.access.index !6 - %2 = tail call [4 x [4 x i32]]* @llvm.preserve.array.access.index.p0a4a4i32.p0a4a4a4i32([4 x [4 x [4 x i32]]]* %1, i32 1, i32 2), !dbg !29, !llvm.preserve.access.index !11 - %3 = tail call [4 x i32]* @llvm.preserve.array.access.index.p0a4i32.p0a4a4i32([4 x [4 x i32]]* %2, i32 1, i32 3), !dbg !29, !llvm.preserve.access.index !15 - %4 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* %3, i32 1, i32 2), !dbg !29, !llvm.preserve.access.index !17 + %0 = tail call %struct.v3* @llvm.preserve.array.access.index.p0s_struct.v3s.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %arg, i32 0, i32 1), !dbg !29, !llvm.preserve.access.index !4 + %1 = tail call [4 x [4 x [4 x i32]]]* @llvm.preserve.struct.access.index.p0a4a4a4i32.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %0, i32 1, i32 1), !dbg !29, !llvm.preserve.access.index !6 + %2 = tail call [4 x [4 x i32]]* @llvm.preserve.array.access.index.p0a4a4i32.p0a4a4a4i32([4 x [4 x [4 x i32]]]* elementtype([4 x [4 x [4 x i32]]]) %1, i32 1, i32 2), !dbg !29, !llvm.preserve.access.index !11 + %3 = tail call [4 x i32]* @llvm.preserve.array.access.index.p0a4i32.p0a4a4i32([4 x [4 x i32]]* elementtype([4 x [4 x i32]]) %2, i32 1, i32 3), !dbg !29, !llvm.preserve.access.index !15 + %4 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a4i32([4 x i32]* elementtype([4 x i32]) %3, i32 1, i32 2), !dbg !29, !llvm.preserve.access.index !17 %call = tail call i32 @get_value(i32* %4) #4, !dbg !30 ret i32 %call, !dbg !31 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-multilevel.ll b/test/CodeGen/BPF/CORE/offset-reloc-multilevel.ll index c9ed68c6387..1ec1b90ed65 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-multilevel.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-multilevel.ll @@ -33,8 +33,8 @@ define dso_local i32 @bpf_prog(%struct.sk_buff*) local_unnamed_addr #0 !dbg !15 call void @llvm.dbg.value(metadata %struct.sk_buff* %0, metadata !28, metadata !DIExpression()), !dbg !30 %3 = bitcast i32* %2 to i8*, !dbg !31 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %3) #4, !dbg !31 - %4 = tail call %struct.net_device* @llvm.preserve.struct.access.index.p0s_struct.net_devices.p0s_struct.sk_buffs(%struct.sk_buff* %0, i32 1, i32 1), !dbg !32, !llvm.preserve.access.index !19 - %5 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.net_devices(%struct.net_device* %4, i32 0, i32 0), !dbg !32, !llvm.preserve.access.index !23 + %4 = tail call %struct.net_device* @llvm.preserve.struct.access.index.p0s_struct.net_devices.p0s_struct.sk_buffs(%struct.sk_buff* elementtype(%struct.sk_buff) %0, i32 1, i32 1), !dbg !32, !llvm.preserve.access.index !19 + %5 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.net_devices(%struct.net_device* elementtype(%struct.net_device) %4, i32 0, i32 0), !dbg !32, !llvm.preserve.access.index !23 %6 = bitcast i32* %5 to i8*, !dbg !32 %7 = call i32 inttoptr (i64 4 to i32 (i8*, i32, i8*)*)(i8* nonnull %3, i32 4, i8* %6) #4, !dbg !33 %8 = load i32, i32* %2, align 4, !dbg !34, !tbaa !35 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-pointer-1.ll b/test/CodeGen/BPF/CORE/offset-reloc-pointer-1.ll index aaf1a2c0154..7413cc87813 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-pointer-1.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-pointer-1.ll @@ -19,7 +19,7 @@ target triple = "bpf" define dso_local i32 @test(%struct.v3* %arg) local_unnamed_addr #0 !dbg !15 { entry: call void @llvm.dbg.value(metadata %struct.v3* %arg, metadata !19, metadata !DIExpression()), !dbg !20 - %0 = tail call %struct.v3* @llvm.preserve.array.access.index.p0s_struct.v3s.p0s_struct.v3s(%struct.v3* %arg, i32 0, i32 1), !dbg !21, !llvm.preserve.access.index !4 + %0 = tail call %struct.v3* @llvm.preserve.array.access.index.p0s_struct.v3s.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %arg, i32 0, i32 1), !dbg !21, !llvm.preserve.access.index !4 %1 = getelementptr inbounds %struct.v3, %struct.v3* %0, i64 0, i32 0, !dbg !21 %call = tail call i32 @get_value(i32* %1) #4, !dbg !22 ret i32 %call, !dbg !23 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-pointer-2.ll b/test/CodeGen/BPF/CORE/offset-reloc-pointer-2.ll index 8c48ca12f11..c0804570b86 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-pointer-2.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-pointer-2.ll @@ -19,8 +19,8 @@ target triple = "bpf" define dso_local i32 @test(%struct.v3* %arg) local_unnamed_addr #0 !dbg !15 { entry: call void @llvm.dbg.value(metadata %struct.v3* %arg, metadata !19, metadata !DIExpression()), !dbg !20 - %0 = tail call %struct.v3* @llvm.preserve.array.access.index.p0s_struct.v3s.p0s_struct.v3s(%struct.v3* %arg, i32 0, i32 1), !dbg !21, !llvm.preserve.access.index !4 - %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v3s(%struct.v3* %0, i32 1, i32 1), !dbg !21, !llvm.preserve.access.index !6 + %0 = tail call %struct.v3* @llvm.preserve.array.access.index.p0s_struct.v3s.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %arg, i32 0, i32 1), !dbg !21, !llvm.preserve.access.index !4 + %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.v3s(%struct.v3* elementtype(%struct.v3) %0, i32 1, i32 1), !dbg !21, !llvm.preserve.access.index !6 %call = tail call i32 @get_value(i32* %1) #4, !dbg !22 ret i32 %call, !dbg !23 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-struct-anonymous.ll b/test/CodeGen/BPF/CORE/offset-reloc-struct-anonymous.ll index ceb6fdb407d..9822697d916 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-struct-anonymous.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-struct-anonymous.ll @@ -32,9 +32,9 @@ define dso_local i32 @bpf_prog(%struct.sk_buff*) local_unnamed_addr #0 !dbg !15 call void @llvm.dbg.value(metadata %struct.sk_buff* %0, metadata !31, metadata !DIExpression()), !dbg !33 %3 = bitcast i32* %2 to i8*, !dbg !34 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %3) #4, !dbg !34 - %4 = tail call [10 x %struct.anon]* @llvm.preserve.struct.access.index.p0a10s_struct.anons.p0s_struct.sk_buffs(%struct.sk_buff* %0, i32 1, i32 1), !dbg !35, !llvm.preserve.access.index !19 - %5 = tail call %struct.anon* @llvm.preserve.array.access.index.p0s_struct.anons.p0a10s_struct.anons([10 x %struct.anon]* %4, i32 1, i32 5), !dbg !35, !llvm.preserve.access.index !23 - %6 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.anons(%struct.anon* %5, i32 0, i32 0), !dbg !35, !llvm.preserve.access.index !24 + %4 = tail call [10 x %struct.anon]* @llvm.preserve.struct.access.index.p0a10s_struct.anons.p0s_struct.sk_buffs(%struct.sk_buff* elementtype(%struct.sk_buff) %0, i32 1, i32 1), !dbg !35, !llvm.preserve.access.index !19 + %5 = tail call %struct.anon* @llvm.preserve.array.access.index.p0s_struct.anons.p0a10s_struct.anons([10 x %struct.anon]* elementtype([10 x %struct.anon]) %4, i32 1, i32 5), !dbg !35, !llvm.preserve.access.index !23 + %6 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.anons(%struct.anon* elementtype(%struct.anon) %5, i32 0, i32 0), !dbg !35, !llvm.preserve.access.index !24 %7 = bitcast i32* %6 to i8*, !dbg !35 %8 = call i32 inttoptr (i64 4 to i32 (i8*, i32, i8*)*)(i8* nonnull %3, i32 4, i8* %7) #4, !dbg !36 %9 = load i32, i32* %2, align 4, !dbg !37, !tbaa !38 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-struct-array.ll b/test/CodeGen/BPF/CORE/offset-reloc-struct-array.ll index bc495e6be88..45d6963b05f 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-struct-array.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-struct-array.ll @@ -33,9 +33,9 @@ define dso_local i32 @bpf_prog(%struct.sk_buff*) local_unnamed_addr #0 !dbg !15 call void @llvm.dbg.value(metadata %struct.sk_buff* %0, metadata !31, metadata !DIExpression()), !dbg !33 %3 = bitcast i32* %2 to i8*, !dbg !34 call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %3) #4, !dbg !34 - %4 = tail call [10 x %struct.net_device]* @llvm.preserve.struct.access.index.p0a10s_struct.net_devices.p0s_struct.sk_buffs(%struct.sk_buff* %0, i32 1, i32 1), !dbg !35, !llvm.preserve.access.index !19 - %5 = tail call %struct.net_device* @llvm.preserve.array.access.index.p0s_struct.net_devices.p0a10s_struct.net_devices([10 x %struct.net_device]* %4, i32 1, i32 5), !dbg !35, !llvm.preserve.access.index !23 - %6 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.net_devices(%struct.net_device* %5, i32 0, i32 0), !dbg !35, !llvm.preserve.access.index !24 + %4 = tail call [10 x %struct.net_device]* @llvm.preserve.struct.access.index.p0a10s_struct.net_devices.p0s_struct.sk_buffs(%struct.sk_buff* elementtype(%struct.sk_buff) %0, i32 1, i32 1), !dbg !35, !llvm.preserve.access.index !19 + %5 = tail call %struct.net_device* @llvm.preserve.array.access.index.p0s_struct.net_devices.p0a10s_struct.net_devices([10 x %struct.net_device]* elementtype([10 x %struct.net_device]) %4, i32 1, i32 5), !dbg !35, !llvm.preserve.access.index !23 + %6 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.net_devices(%struct.net_device* elementtype(%struct.net_device) %5, i32 0, i32 0), !dbg !35, !llvm.preserve.access.index !24 %7 = bitcast i32* %6 to i8*, !dbg !35 %8 = call i32 inttoptr (i64 4 to i32 (i8*, i32, i8*)*)(i8* nonnull %3, i32 4, i8* %7) #4, !dbg !36 %9 = load i32, i32* %2, align 4, !dbg !37, !tbaa !38 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-typedef-array.ll b/test/CodeGen/BPF/CORE/offset-reloc-typedef-array.ll index daf78ca1d6e..bade3f39bb2 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-typedef-array.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-typedef-array.ll @@ -23,8 +23,8 @@ target triple = "bpf" define dso_local i32 @test(%struct.__s* %arg) local_unnamed_addr #0 !dbg !7 { entry: call void @llvm.dbg.value(metadata %struct.__s* %arg, metadata !24, metadata !DIExpression()), !dbg !25 - %0 = tail call [7 x i32]* @llvm.preserve.struct.access.index.p0a7i32.p0s_struct.__ss(%struct.__s* %arg, i32 0, i32 0), !dbg !26, !llvm.preserve.access.index !13 - %1 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a7i32([7 x i32]* %0, i32 1, i32 1), !dbg !26, !llvm.preserve.access.index !19 + %0 = tail call [7 x i32]* @llvm.preserve.struct.access.index.p0a7i32.p0s_struct.__ss(%struct.__s* elementtype(%struct.__s) %arg, i32 0, i32 0), !dbg !26, !llvm.preserve.access.index !13 + %1 = tail call i32* @llvm.preserve.array.access.index.p0i32.p0a7i32([7 x i32]* elementtype([7 x i32]) %0, i32 1, i32 1), !dbg !26, !llvm.preserve.access.index !19 %2 = bitcast i32* %1 to i8*, !dbg !26 %call = tail call i32 @get_value(i8* %2) #4, !dbg !27 ret i32 %call, !dbg !28 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-typedef-struct-2.ll b/test/CodeGen/BPF/CORE/offset-reloc-typedef-struct-2.ll index 8fffc03b61d..e479df5f530 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-typedef-struct-2.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-typedef-struct-2.ll @@ -21,7 +21,7 @@ target triple = "bpf" define dso_local i32 @test(%struct.__t* readonly %arg) local_unnamed_addr #0 !dbg !13 { entry: call void @llvm.dbg.value(metadata %struct.__t* %arg, metadata !18, metadata !DIExpression()), !dbg !19 - %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.__ts(%struct.__t* %arg, i32 0, i32 0), !dbg !20, !llvm.preserve.access.index !4 + %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.__ts(%struct.__t* elementtype(%struct.__t) %arg, i32 0, i32 0), !dbg !20, !llvm.preserve.access.index !4 %1 = load i32, i32* %0, align 4, !dbg !20, !tbaa !21 ret i32 %1, !dbg !26 } diff --git a/test/CodeGen/BPF/CORE/offset-reloc-typedef-struct.ll b/test/CodeGen/BPF/CORE/offset-reloc-typedef-struct.ll index 6a74a5b70f9..2198b4fff23 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-typedef-struct.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-typedef-struct.ll @@ -23,7 +23,7 @@ target triple = "bpf" define dso_local i32 @test(%struct.__s* %arg) local_unnamed_addr #0 !dbg !7 { entry: call void @llvm.dbg.value(metadata %struct.__s* %arg, metadata !21, metadata !DIExpression()), !dbg !22 - %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.__ss(%struct.__s* %arg, i32 1, i32 1), !dbg !23, !llvm.preserve.access.index !14 + %0 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.__ss(%struct.__s* elementtype(%struct.__s) %arg, i32 1, i32 1), !dbg !23, !llvm.preserve.access.index !14 %1 = bitcast i32* %0 to i8*, !dbg !23 %call = tail call i32 @get_value(i8* %1) #4, !dbg !24 ret i32 %call, !dbg !25 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-typedef.ll b/test/CodeGen/BPF/CORE/offset-reloc-typedef.ll index 12efd6633c9..7f7558dbdb6 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-typedef.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-typedef.ll @@ -27,11 +27,11 @@ target triple = "bpf" define dso_local i32 @test([7 x %union.u]* %arg) local_unnamed_addr #0 !dbg !7 { entry: call void @llvm.dbg.value(metadata [7 x %union.u]* %arg, metadata !28, metadata !DIExpression()), !dbg !29 - %0 = tail call [7 x %union.u]* @llvm.preserve.array.access.index.p0a7s_union.us.p0a7s_union.us([7 x %union.u]* %arg, i32 0, i32 1), !dbg !30, !llvm.preserve.access.index !14 + %0 = tail call [7 x %union.u]* @llvm.preserve.array.access.index.p0a7s_union.us.p0a7s_union.us([7 x %union.u]* elementtype([7 x %union.u]) %arg, i32 0, i32 1), !dbg !30, !llvm.preserve.access.index !14 %arraydecay = getelementptr inbounds [7 x %union.u], [7 x %union.u]* %0, i64 0, i64 0, !dbg !30 %1 = tail call %union.u* @llvm.preserve.union.access.index.p0s_union.us.p0s_union.us(%union.u* %arraydecay, i32 1), !dbg !30, !llvm.preserve.access.index !16 %d = getelementptr inbounds %union.u, %union.u* %1, i64 0, i32 0, !dbg !30 - %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* %d, i32 1, i32 1), !dbg !30, !llvm.preserve.access.index !20 + %2 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* elementtype(%struct.s) %d, i32 1, i32 1), !dbg !30, !llvm.preserve.access.index !20 %3 = bitcast i32* %2 to i8*, !dbg !30 %call = tail call i32 @get_value(i8* %3) #4, !dbg !31 ret i32 %call, !dbg !32 diff --git a/test/CodeGen/BPF/CORE/offset-reloc-union.ll b/test/CodeGen/BPF/CORE/offset-reloc-union.ll index 1262fba8dc9..cfc13d12545 100644 --- a/test/CodeGen/BPF/CORE/offset-reloc-union.ll +++ b/test/CodeGen/BPF/CORE/offset-reloc-union.ll @@ -38,7 +38,7 @@ define dso_local i32 @bpf_prog(%union.sk_buff*) local_unnamed_addr #0 !dbg !15 { call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %3) #4, !dbg !35 %4 = tail call %union.sk_buff* @llvm.preserve.union.access.index.p0s_union.sk_buffs.p0s_union.sk_buffs(%union.sk_buff* %0, i32 1), !dbg !36, !llvm.preserve.access.index !19 %5 = getelementptr inbounds %union.sk_buff, %union.sk_buff* %4, i64 0, i32 0, !dbg !36 - %6 = tail call %union.anon* @llvm.preserve.struct.access.index.p0s_union.anons.p0s_struct.anons(%struct.anon* %5, i32 1, i32 1), !dbg !36, !llvm.preserve.access.index !23 + %6 = tail call %union.anon* @llvm.preserve.struct.access.index.p0s_union.anons.p0s_struct.anons(%struct.anon* elementtype(%struct.anon) %5, i32 1, i32 1), !dbg !36, !llvm.preserve.access.index !23 %7 = tail call %union.anon* @llvm.preserve.union.access.index.p0s_union.anons.p0s_union.anons(%union.anon* %6, i32 0), !dbg !36, !llvm.preserve.access.index !27 %8 = bitcast %union.anon* %7 to i8*, !dbg !36 %9 = call i32 inttoptr (i64 4 to i32 (i8*, i32, i8*)*)(i8* nonnull %3, i32 4, i8* %8) #4, !dbg !37 diff --git a/test/CodeGen/BPF/CORE/store-addr.ll b/test/CodeGen/BPF/CORE/store-addr.ll index 47d8fd28059..e2b1e2a233d 100644 --- a/test/CodeGen/BPF/CORE/store-addr.ll +++ b/test/CodeGen/BPF/CORE/store-addr.ll @@ -29,7 +29,7 @@ entry: %0 = bitcast [1 x i64]* %param to i8*, !dbg !28 call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %0) #5, !dbg !28 call void @llvm.dbg.declare(metadata [1 x i64]* %param, metadata !23, metadata !DIExpression()), !dbg !29 - %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ts(%struct.t* %arg, i32 0, i32 0), !dbg !30, !llvm.preserve.access.index !18 + %1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ts(%struct.t* elementtype(%struct.t) %arg, i32 0, i32 0), !dbg !30, !llvm.preserve.access.index !18 %2 = ptrtoint i32* %1 to i64, !dbg !31 %arrayidx = getelementptr inbounds [1 x i64], [1 x i64]* %param, i64 0, i64 0, !dbg !32 store i64 %2, i64* %arrayidx, align 8, !dbg !33, !tbaa !34 diff --git a/test/Verifier/elementtype.ll b/test/Verifier/elementtype.ll index ff957469d70..e092e0f54c9 100644 --- a/test/Verifier/elementtype.ll +++ b/test/Verifier/elementtype.ll @@ -25,4 +25,13 @@ define void @llvm.not_call(i32* elementtype(i32)) { ret void } +define void @elementtype_required() { +; CHECK: Intrinsic requires elementtype attribute on first argument. + call i32* @llvm.preserve.array.access.index.p0i32.p0i32(i32* null, i32 0, i32 0) +; CHECK: Intrinsic requires elementtype attribute on first argument. + call i32* @llvm.preserve.struct.access.index.p0i32.p0i32(i32* null, i32 0, i32 0) + ret void +} + declare i32* @llvm.preserve.array.access.index.p0i32.p0i32(i32*, i32, i32) +declare i32* @llvm.preserve.struct.access.index.p0i32.p0i32(i32*, i32, i32)