Skip to content

Commit 65a421f

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 b46d554 commit 65a421f

File tree

11 files changed

+63
-44
lines changed

11 files changed

+63
-44
lines changed

llvm/include/llvm-c/Core.h

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

28242824
/**

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;
@@ -73,7 +74,7 @@ namespace Intrinsic {
7374
std::string getNameNoUnnamedTypes(ID Id, ArrayRef<Type *> Tys);
7475

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

7879
/// Returns true if the intrinsic can be overloaded.
7980
bool isOverloaded(ID id);
@@ -131,6 +132,7 @@ namespace Intrinsic {
131132
struct IITDescriptor {
132133
enum IITDescriptorKind {
133134
Void,
135+
Byte,
134136
VarArg,
135137
MMX,
136138
Token,
@@ -239,7 +241,8 @@ namespace Intrinsic {
239241
/// Returns false if the given type matches with the constraints, true
240242
/// otherwise.
241243
MatchIntrinsicTypesResult
242-
matchIntrinsicSignature(FunctionType *FTy, ArrayRef<IITDescriptor> &Infos,
244+
matchIntrinsicSignature(const DataLayout &DL, FunctionType *FTy,
245+
ArrayRef<IITDescriptor> &Infos,
243246
SmallVectorImpl<Type *> &ArgTys);
244247

245248
/// Verify if the intrinsic has variable arguments. This method is intended to
@@ -254,8 +257,8 @@ namespace Intrinsic {
254257
///
255258
/// Returns false if the given ID and function type combination is not a
256259
/// valid intrinsic call.
257-
bool getIntrinsicSignature(Intrinsic::ID, FunctionType *FT,
258-
SmallVectorImpl<Type *> &ArgTys);
260+
bool getIntrinsicSignature(const DataLayout &DL, Intrinsic::ID,
261+
FunctionType *FT, SmallVectorImpl<Type *> &ArgTys);
259262

260263
/// Same as previous, but accepts a Function instead of ID and FunctionType.
261264
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
@@ -300,6 +300,7 @@ def IIT_V1 : IIT_Vec<1, 28>;
300300
def IIT_VARARG : IIT_VT<isVoid, 29>;
301301
def IIT_HALF_VEC_ARG : IIT_Base<30>;
302302
def IIT_SAME_VEC_WIDTH_ARG : IIT_Base<31>;
303+
def IIT_BYTE : IIT_Base<32>;
303304
def IIT_VEC_OF_ANYPTRS_TO_ELT : IIT_Base<34>;
304305
def IIT_I128 : IIT_Int<128, 35>;
305306
def IIT_V512 : IIT_Vec<512, 36>;
@@ -382,6 +383,10 @@ class LLVMType<ValueType vt> {
382383
!foreach(iit, IITs, iit.Number));
383384
}
384385

386+
class LLVMByteType : LLVMType<OtherVT> {
387+
let Sig = [IIT_BYTE.Number];
388+
}
389+
385390
class LLVMAnyType<ValueType vt> : LLVMType<vt> {
386391
let ArgCode = !cond(
387392
!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>;
@@ -988,7 +993,7 @@ def int_memmove : Intrinsic<[],
988993
WriteOnly<ArgIndex<0>>, ReadOnly<ArgIndex<1>>,
989994
ImmArg<ArgIndex<3>>]>;
990995
def int_memset : Intrinsic<[],
991-
[llvm_anyptr_ty, llvm_i8_ty, llvm_anyint_ty,
996+
[llvm_anyptr_ty, llvm_byte_ty, llvm_anyint_ty,
992997
llvm_i1_ty],
993998
[IntrWriteMem, IntrArgMemOnly, IntrWillReturn,
994999
IntrNoFree, IntrNoCallback,
@@ -1001,7 +1006,7 @@ def int_memset : Intrinsic<[],
10011006
// The third argument (specifying the size) must be a constant.
10021007
def int_memset_inline
10031008
: Intrinsic<[],
1004-
[llvm_anyptr_ty, llvm_i8_ty, llvm_anyint_ty, llvm_i1_ty],
1009+
[llvm_anyptr_ty, llvm_byte_ty, llvm_anyint_ty, llvm_i1_ty],
10051010
[IntrWriteMem, IntrArgMemOnly, IntrWillReturn, IntrNoFree, IntrNoCallback,
10061011
NoCapture<ArgIndex<0>>, WriteOnly<ArgIndex<0>>,
10071012
ImmArg<ArgIndex<3>>]>;
@@ -2551,7 +2556,7 @@ def int_memmove_element_unordered_atomic
25512556

25522557
// @llvm.memset.element.unordered.atomic.*(dest, value, length, elementsize)
25532558
def int_memset_element_unordered_atomic
2554-
: Intrinsic<[], [llvm_anyptr_ty, llvm_i8_ty, llvm_anyint_ty, llvm_i32_ty],
2559+
: Intrinsic<[], [llvm_anyptr_ty, llvm_byte_ty, llvm_anyint_ty, llvm_i32_ty],
25552560
[IntrWriteMem, IntrArgMemOnly, IntrWillReturn, IntrNoSync,
25562561
NoCapture<ArgIndex<0>>, WriteOnly<ArgIndex<0>>,
25572562
ImmArg<ArgIndex<3>>]>;

llvm/lib/AsmParser/LLParser.cpp

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

358358
SmallVector<Type *> OverloadTys;
359-
if (!Intrinsic::getIntrinsicSignature(IID, CB->getFunctionType(),
360-
OverloadTys))
359+
if (!Intrinsic::getIntrinsicSignature(
360+
M->getDataLayout(), IID, CB->getFunctionType(), OverloadTys))
361361
return error(Info.second, "invalid intrinsic signature");
362362

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

llvm/lib/IR/Core.cpp

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

2482-
LLVMTypeRef LLVMIntrinsicGetType(LLVMContextRef Ctx, unsigned ID,
2482+
LLVMTypeRef LLVMIntrinsicGetType(LLVMModuleRef Mod, unsigned ID,
24832483
LLVMTypeRef *ParamTypes, size_t ParamCount) {
24842484
auto IID = llvm_map_to_intrinsic_id(ID);
24852485
ArrayRef<Type*> Tys(unwrap(ParamTypes), ParamCount);
2486-
return wrap(llvm::Intrinsic::getType(*unwrap(Ctx), IID, Tys));
2486+
return wrap(llvm::Intrinsic::getType(unwrap(Mod), IID, Tys));
24872487
}
24882488

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

llvm/lib/IR/IRBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ CallInst *IRBuilderBase::CreateIntrinsic(Type *RetTy, Intrinsic::ID ID,
924924
FunctionType *FTy = FunctionType::get(RetTy, ArgTys, false);
925925
SmallVector<Type *> OverloadTys;
926926
Intrinsic::MatchIntrinsicTypesResult Res =
927-
matchIntrinsicSignature(FTy, TableRef, OverloadTys);
927+
matchIntrinsicSignature(M->getDataLayout(), FTy, TableRef, OverloadTys);
928928
(void)Res;
929929
assert(Res == Intrinsic::MatchIntrinsicTypes_Match && TableRef.empty() &&
930930
"Wrong types for intrinsic!");

llvm/lib/IR/Intrinsics.cpp

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ static std::string getIntrinsicNameImpl(Intrinsic::ID Id, ArrayRef<Type *> Tys,
167167
if (HasUnnamedType) {
168168
assert(M && "unnamed types need a module");
169169
if (!FT)
170-
FT = Intrinsic::getType(M->getContext(), Id, Tys);
170+
FT = Intrinsic::getType(M, Id, Tys);
171171
else
172-
assert((FT == Intrinsic::getType(M->getContext(), Id, Tys)) &&
172+
assert((FT == Intrinsic::getType(M, Id, Tys)) &&
173173
"Provided FunctionType must match arguments");
174174
return M->getUniqueIntrinsicName(Result, Id, FT);
175175
}
@@ -211,6 +211,9 @@ DecodeIITType(unsigned &NextElt, ArrayRef<unsigned char> Infos,
211211
case IIT_Done:
212212
OutputTable.push_back(IITDescriptor::get(IITDescriptor::Void, 0));
213213
return;
214+
case IIT_BYTE:
215+
OutputTable.push_back(IITDescriptor::get(IITDescriptor::Byte, 0));
216+
return;
214217
case IIT_VARARG:
215218
OutputTable.push_back(IITDescriptor::get(IITDescriptor::VarArg, 0));
216219
return;
@@ -480,7 +483,8 @@ void Intrinsic::getIntrinsicInfoTableEntries(
480483
}
481484

482485
static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
483-
ArrayRef<Type *> Tys, LLVMContext &Context) {
486+
ArrayRef<Type *> Tys, LLVMContext &Context,
487+
const DataLayout &DL) {
484488
using namespace Intrinsic;
485489

486490
IITDescriptor D = Infos.front();
@@ -489,6 +493,8 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
489493
switch (D.Kind) {
490494
case IITDescriptor::Void:
491495
return Type::getVoidTy(Context);
496+
case IITDescriptor::Byte:
497+
return Type::getIntNTy(Context, DL.getByteWidth());
492498
case IITDescriptor::VarArg:
493499
return Type::getVoidTy(Context);
494500
case IITDescriptor::MMX:
@@ -517,14 +523,14 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
517523
case IITDescriptor::Integer:
518524
return IntegerType::get(Context, D.Integer_Width);
519525
case IITDescriptor::Vector:
520-
return VectorType::get(DecodeFixedType(Infos, Tys, Context),
526+
return VectorType::get(DecodeFixedType(Infos, Tys, Context, DL),
521527
D.Vector_Width);
522528
case IITDescriptor::Pointer:
523529
return PointerType::get(Context, D.Pointer_AddressSpace);
524530
case IITDescriptor::Struct: {
525531
SmallVector<Type *, 8> Elts;
526532
for (unsigned i = 0, e = D.Struct_NumElements; i != e; ++i)
527-
Elts.push_back(DecodeFixedType(Infos, Tys, Context));
533+
Elts.push_back(DecodeFixedType(Infos, Tys, Context, DL));
528534
return StructType::get(Context, Elts);
529535
}
530536
case IITDescriptor::Argument:
@@ -557,7 +563,7 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
557563
return VectorType::getHalfElementsVectorType(
558564
cast<VectorType>(Tys[D.getArgumentNumber()]));
559565
case IITDescriptor::SameVecWidthArgument: {
560-
Type *EltTy = DecodeFixedType(Infos, Tys, Context);
566+
Type *EltTy = DecodeFixedType(Infos, Tys, Context, DL);
561567
Type *Ty = Tys[D.getArgumentNumber()];
562568
if (auto *VTy = dyn_cast<VectorType>(Ty))
563569
return VectorType::get(EltTy, VTy->getElementCount());
@@ -582,17 +588,18 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
582588
llvm_unreachable("unhandled");
583589
}
584590

585-
FunctionType *Intrinsic::getType(LLVMContext &Context, ID id,
586-
ArrayRef<Type *> Tys) {
591+
FunctionType *Intrinsic::getType(Module *M, ID id, ArrayRef<Type *> Tys) {
587592
SmallVector<IITDescriptor, 8> Table;
588593
getIntrinsicInfoTableEntries(id, Table);
589594

590595
ArrayRef<IITDescriptor> TableRef = Table;
591-
Type *ResultTy = DecodeFixedType(TableRef, Tys, Context);
596+
Type *ResultTy =
597+
DecodeFixedType(TableRef, Tys, M->getContext(), M->getDataLayout());
592598

593599
SmallVector<Type *, 8> ArgTys;
594600
while (!TableRef.empty())
595-
ArgTys.push_back(DecodeFixedType(TableRef, Tys, Context));
601+
ArgTys.push_back(
602+
DecodeFixedType(TableRef, Tys, M->getContext(), M->getDataLayout()));
596603

597604
// DecodeFixedType returns Void for IITDescriptor::Void and
598605
// IITDescriptor::VarArg If we see void type as the type of the last argument,
@@ -733,7 +740,7 @@ Function *Intrinsic::getOrInsertDeclaration(Module *M, ID id,
733740
ArrayRef<Type *> Tys) {
734741
// There can never be multiple globals with the same name of different types,
735742
// because intrinsics must be a specific type.
736-
auto *FT = getType(M->getContext(), id, Tys);
743+
auto *FT = getType(M, id, Tys);
737744
return cast<Function>(
738745
M->getOrInsertFunction(
739746
Tys.empty() ? getName(id) : getName(id, Tys, M, FT), FT)
@@ -788,7 +795,8 @@ using DeferredIntrinsicMatchPair =
788795
std::pair<Type *, ArrayRef<Intrinsic::IITDescriptor>>;
789796

790797
static bool
791-
matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
798+
matchIntrinsicType(const DataLayout &DL, Type *Ty,
799+
ArrayRef<Intrinsic::IITDescriptor> &Infos,
792800
SmallVectorImpl<Type *> &ArgTys,
793801
SmallVectorImpl<DeferredIntrinsicMatchPair> &DeferredChecks,
794802
bool IsDeferredCheck) {
@@ -811,6 +819,8 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
811819
switch (D.Kind) {
812820
case IITDescriptor::Void:
813821
return !Ty->isVoidTy();
822+
case IITDescriptor::Byte:
823+
return !Ty->isIntegerTy(DL.getByteWidth());
814824
case IITDescriptor::VarArg:
815825
return true;
816826
case IITDescriptor::MMX: {
@@ -844,7 +854,7 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
844854
case IITDescriptor::Vector: {
845855
VectorType *VT = dyn_cast<VectorType>(Ty);
846856
return !VT || VT->getElementCount() != D.Vector_Width ||
847-
matchIntrinsicType(VT->getElementType(), Infos, ArgTys,
857+
matchIntrinsicType(DL, VT->getElementType(), Infos, ArgTys,
848858
DeferredChecks, IsDeferredCheck);
849859
}
850860
case IITDescriptor::Pointer: {
@@ -859,7 +869,7 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
859869
return true;
860870

861871
for (unsigned i = 0, e = D.Struct_NumElements; i != e; ++i)
862-
if (matchIntrinsicType(ST->getElementType(i), Infos, ArgTys,
872+
if (matchIntrinsicType(DL, ST->getElementType(i), Infos, ArgTys,
863873
DeferredChecks, IsDeferredCheck))
864874
return true;
865875
return false;
@@ -949,7 +959,7 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
949959
return true;
950960
EltTy = ThisArgType->getElementType();
951961
}
952-
return matchIntrinsicType(EltTy, Infos, ArgTys, DeferredChecks,
962+
return matchIntrinsicType(DL, EltTy, Infos, ArgTys, DeferredChecks,
953963
IsDeferredCheck);
954964
}
955965
case IITDescriptor::VecOfAnyPtrsToElt: {
@@ -1013,24 +1023,24 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
10131023
}
10141024

10151025
Intrinsic::MatchIntrinsicTypesResult
1016-
Intrinsic::matchIntrinsicSignature(FunctionType *FTy,
1026+
Intrinsic::matchIntrinsicSignature(const DataLayout &DL, FunctionType *FTy,
10171027
ArrayRef<Intrinsic::IITDescriptor> &Infos,
10181028
SmallVectorImpl<Type *> &ArgTys) {
10191029
SmallVector<DeferredIntrinsicMatchPair, 2> DeferredChecks;
1020-
if (matchIntrinsicType(FTy->getReturnType(), Infos, ArgTys, DeferredChecks,
1021-
false))
1030+
if (matchIntrinsicType(DL, FTy->getReturnType(), Infos, ArgTys,
1031+
DeferredChecks, false))
10221032
return MatchIntrinsicTypes_NoMatchRet;
10231033

10241034
unsigned NumDeferredReturnChecks = DeferredChecks.size();
10251035

10261036
for (auto *Ty : FTy->params())
1027-
if (matchIntrinsicType(Ty, Infos, ArgTys, DeferredChecks, false))
1037+
if (matchIntrinsicType(DL, Ty, Infos, ArgTys, DeferredChecks, false))
10281038
return MatchIntrinsicTypes_NoMatchArg;
10291039

10301040
for (unsigned I = 0, E = DeferredChecks.size(); I != E; ++I) {
10311041
DeferredIntrinsicMatchPair &Check = DeferredChecks[I];
1032-
if (matchIntrinsicType(Check.first, Check.second, ArgTys, DeferredChecks,
1033-
true))
1042+
if (matchIntrinsicType(DL, Check.first, Check.second, ArgTys,
1043+
DeferredChecks, true))
10341044
return I < NumDeferredReturnChecks ? MatchIntrinsicTypes_NoMatchRet
10351045
: MatchIntrinsicTypes_NoMatchArg;
10361046
}
@@ -1057,7 +1067,8 @@ bool Intrinsic::matchIntrinsicVarArg(
10571067
return true;
10581068
}
10591069

1060-
bool Intrinsic::getIntrinsicSignature(Intrinsic::ID ID, FunctionType *FT,
1070+
bool Intrinsic::getIntrinsicSignature(const DataLayout &DL, Intrinsic::ID ID,
1071+
FunctionType *FT,
10611072
SmallVectorImpl<Type *> &ArgTys) {
10621073
if (!ID)
10631074
return false;
@@ -1066,7 +1077,7 @@ bool Intrinsic::getIntrinsicSignature(Intrinsic::ID ID, FunctionType *FT,
10661077
getIntrinsicInfoTableEntries(ID, Table);
10671078
ArrayRef<Intrinsic::IITDescriptor> TableRef = Table;
10681079

1069-
if (Intrinsic::matchIntrinsicSignature(FT, TableRef, ArgTys) !=
1080+
if (Intrinsic::matchIntrinsicSignature(DL, FT, TableRef, ArgTys) !=
10701081
Intrinsic::MatchIntrinsicTypesResult::MatchIntrinsicTypes_Match) {
10711082
return false;
10721083
}
@@ -1077,8 +1088,8 @@ bool Intrinsic::getIntrinsicSignature(Intrinsic::ID ID, FunctionType *FT,
10771088

10781089
bool Intrinsic::getIntrinsicSignature(Function *F,
10791090
SmallVectorImpl<Type *> &ArgTys) {
1080-
return getIntrinsicSignature(F->getIntrinsicID(), F->getFunctionType(),
1081-
ArgTys);
1091+
return getIntrinsicSignature(F->getDataLayout(), F->getIntrinsicID(),
1092+
F->getFunctionType(), ArgTys);
10821093
}
10831094

10841095
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
@@ -5376,7 +5376,7 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
53765376
// Walk the descriptors to extract overloaded types.
53775377
SmallVector<Type *, 4> ArgTys;
53785378
Intrinsic::MatchIntrinsicTypesResult Res =
5379-
Intrinsic::matchIntrinsicSignature(IFTy, TableRef, ArgTys);
5379+
Intrinsic::matchIntrinsicSignature(DL, IFTy, TableRef, ArgTys);
53805380
Check(Res != Intrinsic::MatchIntrinsicTypes_NoMatchRet,
53815381
"Intrinsic has incorrect return type!", IF);
53825382
Check(Res != Intrinsic::MatchIntrinsicTypes_NoMatchArg,

llvm/lib/Transforms/IPO/ExpandVariadics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Function *getPreexistingDeclaration(Module *M, Intrinsic::ID Id,
147147
ArrayRef<Type *> Tys = {}) {
148148
if (Tys.empty())
149149
return Intrinsic::getDeclarationIfExists(M, Id);
150-
auto *FT = Intrinsic::getType(M->getContext(), Id, Tys);
150+
auto *FT = Intrinsic::getType(M, Id, Tys);
151151
return Intrinsic::getDeclarationIfExists(M, Id, Tys, FT);
152152
}
153153

llvm/lib/Transforms/Instrumentation/NumericalStabilitySanitizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,7 @@ Value *NumericalStabilitySanitizer::maybeHandleKnownCallBase(
15871587
SmallVector<Type *, 4> ArgTys;
15881588
ArrayRef<Intrinsic::IITDescriptor> TableRef = Table;
15891589
[[maybe_unused]] Intrinsic::MatchIntrinsicTypesResult MatchResult =
1590-
Intrinsic::matchIntrinsicSignature(WidenedFnTy, TableRef, ArgTys);
1590+
Intrinsic::matchIntrinsicSignature(DL, WidenedFnTy, TableRef, ArgTys);
15911591
assert(MatchResult == Intrinsic::MatchIntrinsicTypes_Match &&
15921592
"invalid widened intrinsic");
15931593
// For known intrinsic functions, we create a second call to the same

0 commit comments

Comments
 (0)