Skip to content

Commit 0bf73e3

Browse files
committed
[IR] Make @llvm.memset prototype byte width dependent
This patch changes the type of the value argument of @llvm.memset and similar intrinsics from i8 to iN, where N is the byte width specified in data layout string. Note that the argument still has fixed type (not overloaded), but type checker will complain if the type does not match the byte width. Ideally, the type of the argument would be dependent on the address space of the pointer argument. It is easy to do this (and I did it downstream as a PoC), but since data layout string doesn't currently allow different byte widths for different address spaces, I refrained from doing it now.
1 parent 2488060 commit 0bf73e3

File tree

13 files changed

+69
-46
lines changed

13 files changed

+69
-46
lines changed

llvm/include/llvm-c/Core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2816,7 +2816,7 @@ LLVMValueRef LLVMGetIntrinsicDeclaration(LLVMModuleRef Mod,
28162816
*
28172817
* @see llvm::Intrinsic::getType()
28182818
*/
2819-
LLVMTypeRef LLVMIntrinsicGetType(LLVMContextRef Ctx, unsigned ID,
2819+
LLVMTypeRef LLVMIntrinsicGetType(LLVMModuleRef Mod, unsigned ID,
28202820
LLVMTypeRef *ParamTypes, size_t ParamCount);
28212821

28222822
/**

llvm/include/llvm/IR/Intrinsics.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
namespace llvm {
2424

25+
class DataLayout;
2526
class Type;
2627
class FunctionType;
2728
class Function;
@@ -74,7 +75,7 @@ namespace Intrinsic {
7475
std::string getNameNoUnnamedTypes(ID Id, ArrayRef<Type *> Tys);
7576

7677
/// Return the function type for an intrinsic.
77-
FunctionType *getType(LLVMContext &Context, ID id, ArrayRef<Type *> Tys = {});
78+
FunctionType *getType(Module *M, ID id, ArrayRef<Type *> Tys = {});
7879

7980
/// Returns true if the intrinsic can be overloaded.
8081
bool isOverloaded(ID id);
@@ -135,6 +136,7 @@ namespace Intrinsic {
135136
struct IITDescriptor {
136137
enum IITDescriptorKind {
137138
Void,
139+
Byte,
138140
VarArg,
139141
MMX,
140142
Token,
@@ -251,7 +253,8 @@ namespace Intrinsic {
251253
/// Returns false if the given type matches with the constraints, true
252254
/// otherwise.
253255
MatchIntrinsicTypesResult
254-
matchIntrinsicSignature(FunctionType *FTy, ArrayRef<IITDescriptor> &Infos,
256+
matchIntrinsicSignature(const DataLayout &DL, FunctionType *FTy,
257+
ArrayRef<IITDescriptor> &Infos,
255258
SmallVectorImpl<Type *> &ArgTys);
256259

257260
/// Verify if the intrinsic has variable arguments. This method is intended to
@@ -266,8 +269,8 @@ namespace Intrinsic {
266269
///
267270
/// Returns false if the given ID and function type combination is not a
268271
/// valid intrinsic call.
269-
bool getIntrinsicSignature(Intrinsic::ID, FunctionType *FT,
270-
SmallVectorImpl<Type *> &ArgTys);
272+
bool getIntrinsicSignature(const DataLayout &DL, Intrinsic::ID,
273+
FunctionType *FT, SmallVectorImpl<Type *> &ArgTys);
271274

272275
/// Same as previous, but accepts a Function instead of ID and FunctionType.
273276
bool getIntrinsicSignature(Function *F, SmallVectorImpl<Type *> &ArgTys);

llvm/include/llvm/IR/Intrinsics.td

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ def IIT_V1 : IIT_Vec<1, 28>;
308308
def IIT_VARARG : IIT_VT<isVoid, 29>;
309309
def IIT_HALF_VEC_ARG : IIT_Base<30>;
310310
def IIT_SAME_VEC_WIDTH_ARG : IIT_Base<31>;
311+
def IIT_BYTE : IIT_Base<32>;
311312
def IIT_VEC_OF_ANYPTRS_TO_ELT : IIT_Base<34>;
312313
def IIT_I128 : IIT_Int<128, 35>;
313314
def IIT_V512 : IIT_Vec<512, 36>;
@@ -393,6 +394,10 @@ class LLVMType<ValueType vt> {
393394
!foreach(iit, IITs, iit.Number));
394395
}
395396

397+
class LLVMByteType : LLVMType<OtherVT> {
398+
let Sig = [IIT_BYTE.Number];
399+
}
400+
396401
class LLVMAnyType<ValueType vt> : LLVMType<vt> {
397402
let ArgCode = !cond(
398403
!eq(vt, Any) : ArgKind.Any,
@@ -501,7 +506,7 @@ class LLVMVectorOfBitcastsToInt<int num>
501506
: LLVMMatchType<num, IIT_VEC_OF_BITCASTS_TO_INT>;
502507

503508
def llvm_void_ty : LLVMType<isVoid>;
504-
509+
def llvm_byte_ty : LLVMByteType;
505510
def llvm_any_ty : LLVMAnyType<Any>;
506511
def llvm_anyint_ty : LLVMAnyType<iAny>;
507512
def llvm_anyfloat_ty : LLVMAnyType<fAny>;
@@ -1011,7 +1016,7 @@ def int_memmove : Intrinsic<[],
10111016
WriteOnly<ArgIndex<0>>, ReadOnly<ArgIndex<1>>,
10121017
ImmArg<ArgIndex<3>>]>;
10131018
def int_memset : Intrinsic<[],
1014-
[llvm_anyptr_ty, llvm_i8_ty, llvm_anyint_ty,
1019+
[llvm_anyptr_ty, llvm_byte_ty, llvm_anyint_ty,
10151020
llvm_i1_ty],
10161021
[IntrWriteMem, IntrArgMemOnly, IntrWillReturn,
10171022
IntrNoFree, IntrNoCallback,
@@ -1024,7 +1029,7 @@ def int_memset : Intrinsic<[],
10241029
// The third argument (specifying the size) must be a constant.
10251030
def int_memset_inline
10261031
: Intrinsic<[],
1027-
[llvm_anyptr_ty, llvm_i8_ty, llvm_anyint_ty, llvm_i1_ty],
1032+
[llvm_anyptr_ty, llvm_byte_ty, llvm_anyint_ty, llvm_i1_ty],
10281033
[IntrWriteMem, IntrArgMemOnly, IntrWillReturn, IntrNoFree, IntrNoCallback,
10291034
NoCapture<ArgIndex<0>>, WriteOnly<ArgIndex<0>>,
10301035
ImmArg<ArgIndex<3>>]>;
@@ -2579,7 +2584,7 @@ def int_memmove_element_unordered_atomic
25792584

25802585
// @llvm.memset.element.unordered.atomic.*(dest, value, length, elementsize)
25812586
def int_memset_element_unordered_atomic
2582-
: Intrinsic<[], [llvm_anyptr_ty, llvm_i8_ty, llvm_anyint_ty, llvm_i32_ty],
2587+
: Intrinsic<[], [llvm_anyptr_ty, llvm_byte_ty, llvm_anyint_ty, llvm_i32_ty],
25832588
[IntrWriteMem, IntrArgMemOnly, IntrWillReturn, IntrNoSync,
25842589
NoCapture<ArgIndex<0>>, WriteOnly<ArgIndex<0>>,
25852590
ImmArg<ArgIndex<3>>]>;

llvm/lib/AsmParser/LLParser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ bool LLParser::validateEndOfModule(bool UpgradeDebugInfo) {
347347
return error(Info.second, "intrinsic can only be used as callee");
348348

349349
SmallVector<Type *> OverloadTys;
350-
if (!Intrinsic::getIntrinsicSignature(IID, CB->getFunctionType(),
351-
OverloadTys))
350+
if (!Intrinsic::getIntrinsicSignature(
351+
M->getDataLayout(), IID, CB->getFunctionType(), OverloadTys))
352352
return error(Info.second, "invalid intrinsic signature");
353353

354354
U.set(Intrinsic::getOrInsertDeclaration(M, IID, OverloadTys));

llvm/lib/IR/AutoUpgrade.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,9 @@ bool llvm::UpgradeIntrinsicFunction(Function *F, Function *&NewFn,
15201520
if (Intrinsic::ID id = F->getIntrinsicID()) {
15211521
// Only do this if the intrinsic signature is valid.
15221522
SmallVector<Type *> OverloadTys;
1523-
if (Intrinsic::getIntrinsicSignature(id, F->getFunctionType(), OverloadTys))
1523+
assert(F->getParent());
1524+
if (Intrinsic::getIntrinsicSignature(F->getDataLayout(), id,
1525+
F->getFunctionType(), OverloadTys))
15241526
F->setAttributes(
15251527
Intrinsic::getAttributes(F->getContext(), id, F->getFunctionType()));
15261528
}

llvm/lib/IR/Core.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,11 +2462,11 @@ const char *LLVMIntrinsicGetName(unsigned ID, size_t *NameLength) {
24622462
return Str.data();
24632463
}
24642464

2465-
LLVMTypeRef LLVMIntrinsicGetType(LLVMContextRef Ctx, unsigned ID,
2465+
LLVMTypeRef LLVMIntrinsicGetType(LLVMModuleRef Mod, unsigned ID,
24662466
LLVMTypeRef *ParamTypes, size_t ParamCount) {
24672467
auto IID = llvm_map_to_intrinsic_id(ID);
24682468
ArrayRef<Type*> Tys(unwrap(ParamTypes), ParamCount);
2469-
return wrap(llvm::Intrinsic::getType(*unwrap(Ctx), IID, Tys));
2469+
return wrap(llvm::Intrinsic::getType(unwrap(Mod), IID, Tys));
24702470
}
24712471

24722472
char *LLVMIntrinsicCopyOverloadedName(unsigned ID, LLVMTypeRef *ParamTypes,

llvm/lib/IR/Function.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,9 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace,
518518
// Don't set the attributes if the intrinsic signature is invalid. This
519519
// case will either be auto-upgraded or fail verification.
520520
SmallVector<Type *> OverloadTys;
521-
if (!Intrinsic::getIntrinsicSignature(IntID, Ty, OverloadTys))
521+
assert(ParentModule);
522+
if (!Intrinsic::getIntrinsicSignature(ParentModule->getDataLayout(), IntID,
523+
Ty, OverloadTys))
522524
return;
523525

524526
setAttributes(Intrinsic::getAttributes(getContext(), IntID, Ty));

llvm/lib/IR/IRBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ CallInst *IRBuilderBase::CreateIntrinsic(Type *RetTy, Intrinsic::ID ID,
950950
FunctionType *FTy = FunctionType::get(RetTy, ArgTys, false);
951951
SmallVector<Type *> OverloadTys;
952952
Intrinsic::MatchIntrinsicTypesResult Res =
953-
matchIntrinsicSignature(FTy, TableRef, OverloadTys);
953+
matchIntrinsicSignature(M->getDataLayout(), FTy, TableRef, OverloadTys);
954954
(void)Res;
955955
assert(Res == Intrinsic::MatchIntrinsicTypes_Match && TableRef.empty() &&
956956
"Wrong types for intrinsic!");

llvm/lib/IR/Intrinsics.cpp

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ static std::string getIntrinsicNameImpl(Intrinsic::ID Id, ArrayRef<Type *> Tys,
168168
if (HasUnnamedType) {
169169
assert(M && "unnamed types need a module");
170170
if (!FT)
171-
FT = Intrinsic::getType(M->getContext(), Id, Tys);
171+
FT = Intrinsic::getType(M, Id, Tys);
172172
else
173-
assert((FT == Intrinsic::getType(M->getContext(), Id, Tys)) &&
173+
assert((FT == Intrinsic::getType(M, Id, Tys)) &&
174174
"Provided FunctionType must match arguments");
175175
return M->getUniqueIntrinsicName(Result, Id, FT);
176176
}
@@ -212,6 +212,9 @@ DecodeIITType(unsigned &NextElt, ArrayRef<unsigned char> Infos,
212212
case IIT_Done:
213213
OutputTable.push_back(IITDescriptor::get(IITDescriptor::Void, 0));
214214
return;
215+
case IIT_BYTE:
216+
OutputTable.push_back(IITDescriptor::get(IITDescriptor::Byte, 0));
217+
return;
215218
case IIT_VARARG:
216219
OutputTable.push_back(IITDescriptor::get(IITDescriptor::VarArg, 0));
217220
return;
@@ -499,7 +502,8 @@ void Intrinsic::getIntrinsicInfoTableEntries(
499502
}
500503

501504
static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
502-
ArrayRef<Type *> Tys, LLVMContext &Context) {
505+
ArrayRef<Type *> Tys, LLVMContext &Context,
506+
const DataLayout &DL) {
503507
using namespace Intrinsic;
504508

505509
IITDescriptor D = Infos.front();
@@ -508,6 +512,8 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
508512
switch (D.Kind) {
509513
case IITDescriptor::Void:
510514
return Type::getVoidTy(Context);
515+
case IITDescriptor::Byte:
516+
return Type::getIntNTy(Context, DL.getByteWidth());
511517
case IITDescriptor::VarArg:
512518
return Type::getVoidTy(Context);
513519
case IITDescriptor::MMX:
@@ -536,14 +542,14 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
536542
case IITDescriptor::Integer:
537543
return IntegerType::get(Context, D.Integer_Width);
538544
case IITDescriptor::Vector:
539-
return VectorType::get(DecodeFixedType(Infos, Tys, Context),
545+
return VectorType::get(DecodeFixedType(Infos, Tys, Context, DL),
540546
D.Vector_Width);
541547
case IITDescriptor::Pointer:
542548
return PointerType::get(Context, D.Pointer_AddressSpace);
543549
case IITDescriptor::Struct: {
544550
SmallVector<Type *, 8> Elts;
545551
for (unsigned i = 0, e = D.Struct_NumElements; i != e; ++i)
546-
Elts.push_back(DecodeFixedType(Infos, Tys, Context));
552+
Elts.push_back(DecodeFixedType(Infos, Tys, Context, DL));
547553
return StructType::get(Context, Elts);
548554
}
549555
case IITDescriptor::Argument:
@@ -582,7 +588,7 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
582588
cast<VectorType>(Tys[D.getArgumentNumber()]),
583589
3 + (D.Kind - IITDescriptor::OneThirdVecArgument) * 2);
584590
case IITDescriptor::SameVecWidthArgument: {
585-
Type *EltTy = DecodeFixedType(Infos, Tys, Context);
591+
Type *EltTy = DecodeFixedType(Infos, Tys, Context, DL);
586592
Type *Ty = Tys[D.getArgumentNumber()];
587593
if (auto *VTy = dyn_cast<VectorType>(Ty))
588594
return VectorType::get(EltTy, VTy->getElementCount());
@@ -607,17 +613,18 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
607613
llvm_unreachable("unhandled");
608614
}
609615

610-
FunctionType *Intrinsic::getType(LLVMContext &Context, ID id,
611-
ArrayRef<Type *> Tys) {
616+
FunctionType *Intrinsic::getType(Module *M, ID id, ArrayRef<Type *> Tys) {
612617
SmallVector<IITDescriptor, 8> Table;
613618
getIntrinsicInfoTableEntries(id, Table);
614619

615620
ArrayRef<IITDescriptor> TableRef = Table;
616-
Type *ResultTy = DecodeFixedType(TableRef, Tys, Context);
621+
Type *ResultTy =
622+
DecodeFixedType(TableRef, Tys, M->getContext(), M->getDataLayout());
617623

618624
SmallVector<Type *, 8> ArgTys;
619625
while (!TableRef.empty())
620-
ArgTys.push_back(DecodeFixedType(TableRef, Tys, Context));
626+
ArgTys.push_back(
627+
DecodeFixedType(TableRef, Tys, M->getContext(), M->getDataLayout()));
621628

622629
// DecodeFixedType returns Void for IITDescriptor::Void and
623630
// IITDescriptor::VarArg If we see void type as the type of the last argument,
@@ -766,7 +773,7 @@ Function *Intrinsic::getOrInsertDeclaration(Module *M, ID id,
766773
ArrayRef<Type *> Tys) {
767774
// There can never be multiple globals with the same name of different types,
768775
// because intrinsics must be a specific type.
769-
auto *FT = getType(M->getContext(), id, Tys);
776+
auto *FT = getType(M, id, Tys);
770777
return cast<Function>(
771778
M->getOrInsertFunction(
772779
Tys.empty() ? getName(id) : getName(id, Tys, M, FT), FT)
@@ -821,7 +828,8 @@ using DeferredIntrinsicMatchPair =
821828
std::pair<Type *, ArrayRef<Intrinsic::IITDescriptor>>;
822829

823830
static bool
824-
matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
831+
matchIntrinsicType(const DataLayout &DL, Type *Ty,
832+
ArrayRef<Intrinsic::IITDescriptor> &Infos,
825833
SmallVectorImpl<Type *> &ArgTys,
826834
SmallVectorImpl<DeferredIntrinsicMatchPair> &DeferredChecks,
827835
bool IsDeferredCheck) {
@@ -844,6 +852,8 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
844852
switch (D.Kind) {
845853
case IITDescriptor::Void:
846854
return !Ty->isVoidTy();
855+
case IITDescriptor::Byte:
856+
return !Ty->isIntegerTy(DL.getByteWidth());
847857
case IITDescriptor::VarArg:
848858
return true;
849859
case IITDescriptor::MMX: {
@@ -877,7 +887,7 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
877887
case IITDescriptor::Vector: {
878888
VectorType *VT = dyn_cast<VectorType>(Ty);
879889
return !VT || VT->getElementCount() != D.Vector_Width ||
880-
matchIntrinsicType(VT->getElementType(), Infos, ArgTys,
890+
matchIntrinsicType(DL, VT->getElementType(), Infos, ArgTys,
881891
DeferredChecks, IsDeferredCheck);
882892
}
883893
case IITDescriptor::Pointer: {
@@ -892,7 +902,7 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
892902
return true;
893903

894904
for (unsigned i = 0, e = D.Struct_NumElements; i != e; ++i)
895-
if (matchIntrinsicType(ST->getElementType(i), Infos, ArgTys,
905+
if (matchIntrinsicType(DL, ST->getElementType(i), Infos, ArgTys,
896906
DeferredChecks, IsDeferredCheck))
897907
return true;
898908
return false;
@@ -992,7 +1002,7 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
9921002
return true;
9931003
EltTy = ThisArgType->getElementType();
9941004
}
995-
return matchIntrinsicType(EltTy, Infos, ArgTys, DeferredChecks,
1005+
return matchIntrinsicType(DL, EltTy, Infos, ArgTys, DeferredChecks,
9961006
IsDeferredCheck);
9971007
}
9981008
case IITDescriptor::VecOfAnyPtrsToElt: {
@@ -1056,24 +1066,24 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
10561066
}
10571067

10581068
Intrinsic::MatchIntrinsicTypesResult
1059-
Intrinsic::matchIntrinsicSignature(FunctionType *FTy,
1069+
Intrinsic::matchIntrinsicSignature(const DataLayout &DL, FunctionType *FTy,
10601070
ArrayRef<Intrinsic::IITDescriptor> &Infos,
10611071
SmallVectorImpl<Type *> &ArgTys) {
10621072
SmallVector<DeferredIntrinsicMatchPair, 2> DeferredChecks;
1063-
if (matchIntrinsicType(FTy->getReturnType(), Infos, ArgTys, DeferredChecks,
1064-
false))
1073+
if (matchIntrinsicType(DL, FTy->getReturnType(), Infos, ArgTys,
1074+
DeferredChecks, false))
10651075
return MatchIntrinsicTypes_NoMatchRet;
10661076

10671077
unsigned NumDeferredReturnChecks = DeferredChecks.size();
10681078

10691079
for (auto *Ty : FTy->params())
1070-
if (matchIntrinsicType(Ty, Infos, ArgTys, DeferredChecks, false))
1080+
if (matchIntrinsicType(DL, Ty, Infos, ArgTys, DeferredChecks, false))
10711081
return MatchIntrinsicTypes_NoMatchArg;
10721082

10731083
for (unsigned I = 0, E = DeferredChecks.size(); I != E; ++I) {
10741084
DeferredIntrinsicMatchPair &Check = DeferredChecks[I];
1075-
if (matchIntrinsicType(Check.first, Check.second, ArgTys, DeferredChecks,
1076-
true))
1085+
if (matchIntrinsicType(DL, Check.first, Check.second, ArgTys,
1086+
DeferredChecks, true))
10771087
return I < NumDeferredReturnChecks ? MatchIntrinsicTypes_NoMatchRet
10781088
: MatchIntrinsicTypes_NoMatchArg;
10791089
}
@@ -1100,7 +1110,8 @@ bool Intrinsic::matchIntrinsicVarArg(
11001110
return true;
11011111
}
11021112

1103-
bool Intrinsic::getIntrinsicSignature(Intrinsic::ID ID, FunctionType *FT,
1113+
bool Intrinsic::getIntrinsicSignature(const DataLayout &DL, Intrinsic::ID ID,
1114+
FunctionType *FT,
11041115
SmallVectorImpl<Type *> &ArgTys) {
11051116
if (!ID)
11061117
return false;
@@ -1109,7 +1120,7 @@ bool Intrinsic::getIntrinsicSignature(Intrinsic::ID ID, FunctionType *FT,
11091120
getIntrinsicInfoTableEntries(ID, Table);
11101121
ArrayRef<Intrinsic::IITDescriptor> TableRef = Table;
11111122

1112-
if (Intrinsic::matchIntrinsicSignature(FT, TableRef, ArgTys) !=
1123+
if (Intrinsic::matchIntrinsicSignature(DL, FT, TableRef, ArgTys) !=
11131124
Intrinsic::MatchIntrinsicTypesResult::MatchIntrinsicTypes_Match) {
11141125
return false;
11151126
}
@@ -1120,8 +1131,8 @@ bool Intrinsic::getIntrinsicSignature(Intrinsic::ID ID, FunctionType *FT,
11201131

11211132
bool Intrinsic::getIntrinsicSignature(Function *F,
11221133
SmallVectorImpl<Type *> &ArgTys) {
1123-
return getIntrinsicSignature(F->getIntrinsicID(), F->getFunctionType(),
1124-
ArgTys);
1134+
return getIntrinsicSignature(F->getDataLayout(), F->getIntrinsicID(),
1135+
F->getFunctionType(), ArgTys);
11251136
}
11261137

11271138
std::optional<Function *> Intrinsic::remangleIntrinsicFunction(Function *F) {

llvm/lib/IR/Verifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5412,7 +5412,7 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
54125412
// Walk the descriptors to extract overloaded types.
54135413
SmallVector<Type *, 4> ArgTys;
54145414
Intrinsic::MatchIntrinsicTypesResult Res =
5415-
Intrinsic::matchIntrinsicSignature(IFTy, TableRef, ArgTys);
5415+
Intrinsic::matchIntrinsicSignature(DL, IFTy, TableRef, ArgTys);
54165416
Check(Res != Intrinsic::MatchIntrinsicTypes_NoMatchRet,
54175417
"Intrinsic has incorrect return type!", IF);
54185418
Check(Res != Intrinsic::MatchIntrinsicTypes_NoMatchArg,

0 commit comments

Comments
 (0)