Skip to content

Commit 5332872

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 670e94d commit 5332872

File tree

13 files changed

+71
-47
lines changed

13 files changed

+71
-47
lines changed

llvm/include/llvm-c/Core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2963,7 +2963,7 @@ LLVM_C_ABI LLVMValueRef LLVMGetIntrinsicDeclaration(LLVMModuleRef Mod,
29632963
*
29642964
* @see llvm::Intrinsic::getType()
29652965
*/
2966-
LLVM_C_ABI LLVMTypeRef LLVMIntrinsicGetType(LLVMContextRef Ctx, unsigned ID,
2966+
LLVM_C_ABI LLVMTypeRef LLVMIntrinsicGetType(LLVMModuleRef Mod, unsigned ID,
29672967
LLVMTypeRef *ParamTypes,
29682968
size_t ParamCount);
29692969

llvm/include/llvm/IR/Intrinsics.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
namespace llvm {
2525

26+
class DataLayout;
2627
class Type;
2728
class FunctionType;
2829
class Function;
@@ -75,7 +76,7 @@ namespace Intrinsic {
7576
LLVM_ABI std::string getNameNoUnnamedTypes(ID Id, ArrayRef<Type *> Tys);
7677

7778
/// Return the function type for an intrinsic.
78-
LLVM_ABI FunctionType *getType(LLVMContext &Context, ID id,
79+
LLVM_ABI FunctionType *getType(const Module *M, ID id,
7980
ArrayRef<Type *> Tys = {});
8081

8182
/// Returns true if the intrinsic can be overloaded.
@@ -135,6 +136,7 @@ namespace Intrinsic {
135136
struct IITDescriptor {
136137
enum IITDescriptorKind {
137138
Void,
139+
Byte,
138140
VarArg,
139141
MMX,
140142
Token,
@@ -247,9 +249,9 @@ namespace Intrinsic {
247249
///
248250
/// Returns false if the given type matches with the constraints, true
249251
/// otherwise.
250-
LLVM_ABI MatchIntrinsicTypesResult
251-
matchIntrinsicSignature(FunctionType *FTy, ArrayRef<IITDescriptor> &Infos,
252-
SmallVectorImpl<Type *> &ArgTys);
252+
LLVM_ABI MatchIntrinsicTypesResult matchIntrinsicSignature(
253+
const DataLayout &DL, FunctionType *FTy, ArrayRef<IITDescriptor> &Infos,
254+
SmallVectorImpl<Type *> &ArgTys);
253255

254256
/// Verify if the intrinsic has variable arguments. This method is intended to
255257
/// be called after all the fixed arguments have been matched first.
@@ -264,7 +266,8 @@ namespace Intrinsic {
264266
///
265267
/// Returns false if the given ID and function type combination is not a
266268
/// valid intrinsic call.
267-
LLVM_ABI bool getIntrinsicSignature(Intrinsic::ID, FunctionType *FT,
269+
LLVM_ABI bool getIntrinsicSignature(const DataLayout &DL, Intrinsic::ID,
270+
FunctionType *FT,
268271
SmallVectorImpl<Type *> &ArgTys);
269272

270273
/// Same as previous, but accepts a Function instead of ID and FunctionType.

llvm/include/llvm/IR/Intrinsics.td

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ def IIT_V6 : IIT_Vec<6, 50>;
334334
def IIT_V10 : IIT_Vec<10, 51>;
335335
def IIT_V2048 : IIT_Vec<2048, 52>;
336336
def IIT_V4096 : IIT_Vec<4096, 53>;
337+
def IIT_BYTE : IIT_Base<54>;
337338
}
338339

339340
defvar IIT_all_FixedTypes = !filter(iit, IIT_all,
@@ -376,6 +377,10 @@ class LLVMType<ValueType vt> {
376377
!foreach(iit, IITs, iit.Number));
377378
}
378379

380+
class LLVMByteType : LLVMType<OtherVT> {
381+
let Sig = [IIT_BYTE.Number];
382+
}
383+
379384
class LLVMAnyType<ValueType vt> : LLVMType<vt> {
380385
let ArgCode = !cond(
381386
!eq(vt, Any) : ArgKind.Any,
@@ -481,7 +486,7 @@ class LLVMVectorOfBitcastsToInt<int num>
481486
: LLVMMatchType<num, IIT_VEC_OF_BITCASTS_TO_INT>;
482487

483488
def llvm_void_ty : LLVMType<isVoid>;
484-
489+
def llvm_byte_ty : LLVMByteType;
485490
def llvm_any_ty : LLVMAnyType<Any>;
486491
def llvm_anyint_ty : LLVMAnyType<iAny>;
487492
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>>]>;
@@ -2621,7 +2626,7 @@ def int_memmove_element_unordered_atomic
26212626

26222627
// @llvm.memset.element.unordered.atomic.*(dest, value, length, elementsize)
26232628
def int_memset_element_unordered_atomic
2624-
: Intrinsic<[], [llvm_anyptr_ty, llvm_i8_ty, llvm_anyint_ty, llvm_i32_ty],
2629+
: Intrinsic<[], [llvm_anyptr_ty, llvm_byte_ty, llvm_anyint_ty, llvm_i32_ty],
26252630
[IntrWriteMem, IntrArgMemOnly, IntrWillReturn, IntrNoSync,
26262631
NoCapture<ArgIndex<0>>, WriteOnly<ArgIndex<0>>,
26272632
ImmArg<ArgIndex<3>>]>;

llvm/lib/AsmParser/LLParser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ bool LLParser::validateEndOfModule(bool UpgradeDebugInfo) {
343343

344344
SmallVector<Type *> OverloadTys;
345345
if (IID != Intrinsic::not_intrinsic &&
346-
Intrinsic::getIntrinsicSignature(IID, CB->getFunctionType(),
347-
OverloadTys)) {
346+
Intrinsic::getIntrinsicSignature(
347+
M->getDataLayout(), IID, CB->getFunctionType(), OverloadTys)) {
348348
U.set(Intrinsic::getOrInsertDeclaration(M, IID, OverloadTys));
349349
} else {
350350
// Try to upgrade the intrinsic.

llvm/lib/IR/AutoUpgrade.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1749,7 +1749,9 @@ bool llvm::UpgradeIntrinsicFunction(Function *F, Function *&NewFn,
17491749
if (Intrinsic::ID id = F->getIntrinsicID()) {
17501750
// Only do this if the intrinsic signature is valid.
17511751
SmallVector<Type *> OverloadTys;
1752-
if (Intrinsic::getIntrinsicSignature(id, F->getFunctionType(), OverloadTys))
1752+
assert(F->getParent());
1753+
if (Intrinsic::getIntrinsicSignature(F->getDataLayout(), id,
1754+
F->getFunctionType(), OverloadTys))
17531755
F->setAttributes(
17541756
Intrinsic::getAttributes(F->getContext(), id, F->getFunctionType()));
17551757
}

llvm/lib/IR/Core.cpp

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

2499-
LLVMTypeRef LLVMIntrinsicGetType(LLVMContextRef Ctx, unsigned ID,
2499+
LLVMTypeRef LLVMIntrinsicGetType(LLVMModuleRef Mod, unsigned ID,
25002500
LLVMTypeRef *ParamTypes, size_t ParamCount) {
25012501
auto IID = llvm_map_to_intrinsic_id(ID);
25022502
ArrayRef<Type*> Tys(unwrap(ParamTypes), ParamCount);
2503-
return wrap(llvm::Intrinsic::getType(*unwrap(Ctx), IID, Tys));
2503+
return wrap(llvm::Intrinsic::getType(unwrap(Mod), IID, Tys));
25042504
}
25052505

25062506
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
@@ -507,7 +507,9 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace,
507507
// Don't set the attributes if the intrinsic signature is invalid. This
508508
// case will either be auto-upgraded or fail verification.
509509
SmallVector<Type *> OverloadTys;
510-
if (!Intrinsic::getIntrinsicSignature(IntID, Ty, OverloadTys))
510+
assert(ParentModule);
511+
if (!Intrinsic::getIntrinsicSignature(ParentModule->getDataLayout(), IntID,
512+
Ty, OverloadTys))
511513
return;
512514

513515
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
@@ -869,7 +869,7 @@ CallInst *IRBuilderBase::CreateIntrinsic(Type *RetTy, Intrinsic::ID ID,
869869
FunctionType *FTy = FunctionType::get(RetTy, ArgTys, false);
870870
SmallVector<Type *> OverloadTys;
871871
Intrinsic::MatchIntrinsicTypesResult Res =
872-
matchIntrinsicSignature(FTy, TableRef, OverloadTys);
872+
matchIntrinsicSignature(M->getDataLayout(), FTy, TableRef, OverloadTys);
873873
(void)Res;
874874
assert(Res == Intrinsic::MatchIntrinsicTypes_Match && TableRef.empty() &&
875875
"Wrong types for intrinsic!");

llvm/lib/IR/Intrinsics.cpp

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ static std::string getIntrinsicNameImpl(Intrinsic::ID Id, ArrayRef<Type *> Tys,
169169
if (HasUnnamedType) {
170170
assert(M && "unnamed types need a module");
171171
if (!FT)
172-
FT = Intrinsic::getType(M->getContext(), Id, Tys);
172+
FT = Intrinsic::getType(M, Id, Tys);
173173
else
174-
assert((FT == Intrinsic::getType(M->getContext(), Id, Tys)) &&
174+
assert((FT == Intrinsic::getType(M, Id, Tys)) &&
175175
"Provided FunctionType must match arguments");
176176
return M->getUniqueIntrinsicName(Result, Id, FT);
177177
}
@@ -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;
@@ -471,7 +474,8 @@ void Intrinsic::getIntrinsicInfoTableEntries(
471474
}
472475

473476
static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
474-
ArrayRef<Type *> Tys, LLVMContext &Context) {
477+
ArrayRef<Type *> Tys, LLVMContext &Context,
478+
const DataLayout &DL) {
475479
using namespace Intrinsic;
476480

477481
IITDescriptor D = Infos.front();
@@ -480,6 +484,8 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
480484
switch (D.Kind) {
481485
case IITDescriptor::Void:
482486
return Type::getVoidTy(Context);
487+
case IITDescriptor::Byte:
488+
return Type::getIntNTy(Context, DL.getByteWidth());
483489
case IITDescriptor::VarArg:
484490
return Type::getVoidTy(Context);
485491
case IITDescriptor::MMX:
@@ -508,14 +514,14 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
508514
case IITDescriptor::Integer:
509515
return IntegerType::get(Context, D.Integer_Width);
510516
case IITDescriptor::Vector:
511-
return VectorType::get(DecodeFixedType(Infos, Tys, Context),
517+
return VectorType::get(DecodeFixedType(Infos, Tys, Context, DL),
512518
D.Vector_Width);
513519
case IITDescriptor::Pointer:
514520
return PointerType::get(Context, D.Pointer_AddressSpace);
515521
case IITDescriptor::Struct: {
516522
SmallVector<Type *, 8> Elts;
517523
for (unsigned i = 0, e = D.Struct_NumElements; i != e; ++i)
518-
Elts.push_back(DecodeFixedType(Infos, Tys, Context));
524+
Elts.push_back(DecodeFixedType(Infos, Tys, Context, DL));
519525
return StructType::get(Context, Elts);
520526
}
521527
case IITDescriptor::Argument:
@@ -548,7 +554,7 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
548554
return VectorType::getOneNthElementsVectorType(
549555
cast<VectorType>(Tys[D.getRefArgNumber()]), D.getVectorDivisor());
550556
case IITDescriptor::SameVecWidthArgument: {
551-
Type *EltTy = DecodeFixedType(Infos, Tys, Context);
557+
Type *EltTy = DecodeFixedType(Infos, Tys, Context, DL);
552558
Type *Ty = Tys[D.getArgumentNumber()];
553559
if (auto *VTy = dyn_cast<VectorType>(Ty))
554560
return VectorType::get(EltTy, VTy->getElementCount());
@@ -573,17 +579,18 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
573579
llvm_unreachable("unhandled");
574580
}
575581

576-
FunctionType *Intrinsic::getType(LLVMContext &Context, ID id,
577-
ArrayRef<Type *> Tys) {
582+
FunctionType *Intrinsic::getType(const Module *M, ID id, ArrayRef<Type *> Tys) {
578583
SmallVector<IITDescriptor, 8> Table;
579584
getIntrinsicInfoTableEntries(id, Table);
580585

581586
ArrayRef<IITDescriptor> TableRef = Table;
582-
Type *ResultTy = DecodeFixedType(TableRef, Tys, Context);
587+
Type *ResultTy =
588+
DecodeFixedType(TableRef, Tys, M->getContext(), M->getDataLayout());
583589

584590
SmallVector<Type *, 8> ArgTys;
585591
while (!TableRef.empty())
586-
ArgTys.push_back(DecodeFixedType(TableRef, Tys, Context));
592+
ArgTys.push_back(
593+
DecodeFixedType(TableRef, Tys, M->getContext(), M->getDataLayout()));
587594

588595
// DecodeFixedType returns Void for IITDescriptor::Void and
589596
// IITDescriptor::VarArg If we see void type as the type of the last argument,
@@ -724,7 +731,7 @@ Function *Intrinsic::getOrInsertDeclaration(Module *M, ID id,
724731
ArrayRef<Type *> Tys) {
725732
// There can never be multiple globals with the same name of different types,
726733
// because intrinsics must be a specific type.
727-
auto *FT = getType(M->getContext(), id, Tys);
734+
auto *FT = getType(M, id, Tys);
728735
Function *F = cast<Function>(
729736
M->getOrInsertFunction(
730737
Tys.empty() ? getName(id) : getName(id, Tys, M, FT), FT)
@@ -792,7 +799,8 @@ using DeferredIntrinsicMatchPair =
792799
std::pair<Type *, ArrayRef<Intrinsic::IITDescriptor>>;
793800

794801
static bool
795-
matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
802+
matchIntrinsicType(const DataLayout &DL, Type *Ty,
803+
ArrayRef<Intrinsic::IITDescriptor> &Infos,
796804
SmallVectorImpl<Type *> &ArgTys,
797805
SmallVectorImpl<DeferredIntrinsicMatchPair> &DeferredChecks,
798806
bool IsDeferredCheck) {
@@ -815,6 +823,8 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
815823
switch (D.Kind) {
816824
case IITDescriptor::Void:
817825
return !Ty->isVoidTy();
826+
case IITDescriptor::Byte:
827+
return !Ty->isIntegerTy(DL.getByteWidth());
818828
case IITDescriptor::VarArg:
819829
return true;
820830
case IITDescriptor::MMX: {
@@ -848,7 +858,7 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
848858
case IITDescriptor::Vector: {
849859
VectorType *VT = dyn_cast<VectorType>(Ty);
850860
return !VT || VT->getElementCount() != D.Vector_Width ||
851-
matchIntrinsicType(VT->getElementType(), Infos, ArgTys,
861+
matchIntrinsicType(DL, VT->getElementType(), Infos, ArgTys,
852862
DeferredChecks, IsDeferredCheck);
853863
}
854864
case IITDescriptor::Pointer: {
@@ -863,7 +873,7 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
863873
return true;
864874

865875
for (unsigned i = 0, e = D.Struct_NumElements; i != e; ++i)
866-
if (matchIntrinsicType(ST->getElementType(i), Infos, ArgTys,
876+
if (matchIntrinsicType(DL, ST->getElementType(i), Infos, ArgTys,
867877
DeferredChecks, IsDeferredCheck))
868878
return true;
869879
return false;
@@ -954,7 +964,7 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
954964
return true;
955965
EltTy = ThisArgType->getElementType();
956966
}
957-
return matchIntrinsicType(EltTy, Infos, ArgTys, DeferredChecks,
967+
return matchIntrinsicType(DL, EltTy, Infos, ArgTys, DeferredChecks,
958968
IsDeferredCheck);
959969
}
960970
case IITDescriptor::VecOfAnyPtrsToElt: {
@@ -1018,24 +1028,24 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
10181028
}
10191029

10201030
Intrinsic::MatchIntrinsicTypesResult
1021-
Intrinsic::matchIntrinsicSignature(FunctionType *FTy,
1031+
Intrinsic::matchIntrinsicSignature(const DataLayout &DL, FunctionType *FTy,
10221032
ArrayRef<Intrinsic::IITDescriptor> &Infos,
10231033
SmallVectorImpl<Type *> &ArgTys) {
10241034
SmallVector<DeferredIntrinsicMatchPair, 2> DeferredChecks;
1025-
if (matchIntrinsicType(FTy->getReturnType(), Infos, ArgTys, DeferredChecks,
1026-
false))
1035+
if (matchIntrinsicType(DL, FTy->getReturnType(), Infos, ArgTys,
1036+
DeferredChecks, false))
10271037
return MatchIntrinsicTypes_NoMatchRet;
10281038

10291039
unsigned NumDeferredReturnChecks = DeferredChecks.size();
10301040

10311041
for (auto *Ty : FTy->params())
1032-
if (matchIntrinsicType(Ty, Infos, ArgTys, DeferredChecks, false))
1042+
if (matchIntrinsicType(DL, Ty, Infos, ArgTys, DeferredChecks, false))
10331043
return MatchIntrinsicTypes_NoMatchArg;
10341044

10351045
for (unsigned I = 0, E = DeferredChecks.size(); I != E; ++I) {
10361046
DeferredIntrinsicMatchPair &Check = DeferredChecks[I];
1037-
if (matchIntrinsicType(Check.first, Check.second, ArgTys, DeferredChecks,
1038-
true))
1047+
if (matchIntrinsicType(DL, Check.first, Check.second, ArgTys,
1048+
DeferredChecks, true))
10391049
return I < NumDeferredReturnChecks ? MatchIntrinsicTypes_NoMatchRet
10401050
: MatchIntrinsicTypes_NoMatchArg;
10411051
}
@@ -1062,7 +1072,8 @@ bool Intrinsic::matchIntrinsicVarArg(
10621072
return true;
10631073
}
10641074

1065-
bool Intrinsic::getIntrinsicSignature(Intrinsic::ID ID, FunctionType *FT,
1075+
bool Intrinsic::getIntrinsicSignature(const DataLayout &DL, Intrinsic::ID ID,
1076+
FunctionType *FT,
10661077
SmallVectorImpl<Type *> &ArgTys) {
10671078
if (!ID)
10681079
return false;
@@ -1071,7 +1082,7 @@ bool Intrinsic::getIntrinsicSignature(Intrinsic::ID ID, FunctionType *FT,
10711082
getIntrinsicInfoTableEntries(ID, Table);
10721083
ArrayRef<Intrinsic::IITDescriptor> TableRef = Table;
10731084

1074-
if (Intrinsic::matchIntrinsicSignature(FT, TableRef, ArgTys) !=
1085+
if (Intrinsic::matchIntrinsicSignature(DL, FT, TableRef, ArgTys) !=
10751086
Intrinsic::MatchIntrinsicTypesResult::MatchIntrinsicTypes_Match) {
10761087
return false;
10771088
}
@@ -1082,8 +1093,8 @@ bool Intrinsic::getIntrinsicSignature(Intrinsic::ID ID, FunctionType *FT,
10821093

10831094
bool Intrinsic::getIntrinsicSignature(Function *F,
10841095
SmallVectorImpl<Type *> &ArgTys) {
1085-
return getIntrinsicSignature(F->getIntrinsicID(), F->getFunctionType(),
1086-
ArgTys);
1096+
return getIntrinsicSignature(F->getDataLayout(), F->getIntrinsicID(),
1097+
F->getFunctionType(), ArgTys);
10871098
}
10881099

10891100
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
@@ -5682,7 +5682,7 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
56825682
// Walk the descriptors to extract overloaded types.
56835683
SmallVector<Type *, 4> ArgTys;
56845684
Intrinsic::MatchIntrinsicTypesResult Res =
5685-
Intrinsic::matchIntrinsicSignature(IFTy, TableRef, ArgTys);
5685+
Intrinsic::matchIntrinsicSignature(DL, IFTy, TableRef, ArgTys);
56865686
Check(Res != Intrinsic::MatchIntrinsicTypes_NoMatchRet,
56875687
"Intrinsic has incorrect return type!", IF);
56885688
Check(Res != Intrinsic::MatchIntrinsicTypes_NoMatchArg,

0 commit comments

Comments
 (0)