Skip to content

Commit 4cee863

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 31ee84f commit 4cee863

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
@@ -2823,7 +2823,7 @@ LLVMValueRef LLVMGetIntrinsicDeclaration(LLVMModuleRef Mod,
28232823
*
28242824
* @see llvm::Intrinsic::getType()
28252825
*/
2826-
LLVMTypeRef LLVMIntrinsicGetType(LLVMContextRef Ctx, unsigned ID,
2826+
LLVMTypeRef LLVMIntrinsicGetType(LLVMModuleRef Mod, unsigned ID,
28272827
LLVMTypeRef *ParamTypes, size_t ParamCount);
28282828

28292829
/**

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);
@@ -138,6 +139,7 @@ namespace Intrinsic {
138139
struct IITDescriptor {
139140
enum IITDescriptorKind {
140141
Void,
142+
Byte,
141143
VarArg,
142144
MMX,
143145
Token,
@@ -246,7 +248,8 @@ namespace Intrinsic {
246248
/// Returns false if the given type matches with the constraints, true
247249
/// otherwise.
248250
MatchIntrinsicTypesResult
249-
matchIntrinsicSignature(FunctionType *FTy, ArrayRef<IITDescriptor> &Infos,
251+
matchIntrinsicSignature(const DataLayout &DL, FunctionType *FTy,
252+
ArrayRef<IITDescriptor> &Infos,
250253
SmallVectorImpl<Type *> &ArgTys);
251254

252255
/// Verify if the intrinsic has variable arguments. This method is intended to
@@ -261,8 +264,8 @@ namespace Intrinsic {
261264
///
262265
/// Returns false if the given ID and function type combination is not a
263266
/// valid intrinsic call.
264-
bool getIntrinsicSignature(Intrinsic::ID, FunctionType *FT,
265-
SmallVectorImpl<Type *> &ArgTys);
267+
bool getIntrinsicSignature(const DataLayout &DL, Intrinsic::ID,
268+
FunctionType *FT, SmallVectorImpl<Type *> &ArgTys);
266269

267270
/// Same as previous, but accepts a Function instead of ID and FunctionType.
268271
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>>]>;
@@ -2524,7 +2529,7 @@ def int_memmove_element_unordered_atomic
25242529

25252530
// @llvm.memset.element.unordered.atomic.*(dest, value, length, elementsize)
25262531
def int_memset_element_unordered_atomic
2527-
: Intrinsic<[], [llvm_anyptr_ty, llvm_i8_ty, llvm_anyint_ty, llvm_i32_ty],
2532+
: Intrinsic<[], [llvm_anyptr_ty, llvm_byte_ty, llvm_anyint_ty, llvm_i32_ty],
25282533
[IntrWriteMem, IntrArgMemOnly, IntrWillReturn, IntrNoSync,
25292534
NoCapture<ArgIndex<0>>, WriteOnly<ArgIndex<0>>,
25302535
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
@@ -2478,11 +2478,11 @@ const char *LLVMIntrinsicGetName(unsigned ID, size_t *NameLength) {
24782478
return Str.data();
24792479
}
24802480

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

24882488
const char *LLVMIntrinsicCopyOverloadedName(unsigned ID,

llvm/lib/IR/IRBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ CallInst *IRBuilderBase::CreateIntrinsic(Type *RetTy, Intrinsic::ID ID,
914914
FunctionType *FTy = FunctionType::get(RetTy, ArgTys, false);
915915
SmallVector<Type *> OverloadTys;
916916
Intrinsic::MatchIntrinsicTypesResult Res =
917-
matchIntrinsicSignature(FTy, TableRef, OverloadTys);
917+
matchIntrinsicSignature(M->getDataLayout(), FTy, TableRef, OverloadTys);
918918
(void)Res;
919919
assert(Res == Intrinsic::MatchIntrinsicTypes_Match && TableRef.empty() &&
920920
"Wrong types for intrinsic!");

llvm/lib/IR/Intrinsics.cpp

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ static std::string getIntrinsicNameImpl(Intrinsic::ID Id, ArrayRef<Type *> Tys,
172172
if (HasUnnamedType) {
173173
assert(M && "unnamed types need a module");
174174
if (!FT)
175-
FT = Intrinsic::getType(M->getContext(), Id, Tys);
175+
FT = Intrinsic::getType(M, Id, Tys);
176176
else
177-
assert((FT == Intrinsic::getType(M->getContext(), Id, Tys)) &&
177+
assert((FT == Intrinsic::getType(M, Id, Tys)) &&
178178
"Provided FunctionType must match arguments");
179179
return M->getUniqueIntrinsicName(Result, Id, FT);
180180
}
@@ -216,6 +216,9 @@ DecodeIITType(unsigned &NextElt, ArrayRef<unsigned char> Infos,
216216
case IIT_Done:
217217
OutputTable.push_back(IITDescriptor::get(IITDescriptor::Void, 0));
218218
return;
219+
case IIT_BYTE:
220+
OutputTable.push_back(IITDescriptor::get(IITDescriptor::Byte, 0));
221+
return;
219222
case IIT_VARARG:
220223
OutputTable.push_back(IITDescriptor::get(IITDescriptor::VarArg, 0));
221224
return;
@@ -485,7 +488,8 @@ void Intrinsic::getIntrinsicInfoTableEntries(
485488
}
486489

487490
static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
488-
ArrayRef<Type *> Tys, LLVMContext &Context) {
491+
ArrayRef<Type *> Tys, LLVMContext &Context,
492+
const DataLayout &DL) {
489493
using namespace Intrinsic;
490494

491495
IITDescriptor D = Infos.front();
@@ -494,6 +498,8 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
494498
switch (D.Kind) {
495499
case IITDescriptor::Void:
496500
return Type::getVoidTy(Context);
501+
case IITDescriptor::Byte:
502+
return Type::getIntNTy(Context, DL.getByteWidth());
497503
case IITDescriptor::VarArg:
498504
return Type::getVoidTy(Context);
499505
case IITDescriptor::MMX:
@@ -522,14 +528,14 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
522528
case IITDescriptor::Integer:
523529
return IntegerType::get(Context, D.Integer_Width);
524530
case IITDescriptor::Vector:
525-
return VectorType::get(DecodeFixedType(Infos, Tys, Context),
531+
return VectorType::get(DecodeFixedType(Infos, Tys, Context, DL),
526532
D.Vector_Width);
527533
case IITDescriptor::Pointer:
528534
return PointerType::get(Context, D.Pointer_AddressSpace);
529535
case IITDescriptor::Struct: {
530536
SmallVector<Type *, 8> Elts;
531537
for (unsigned i = 0, e = D.Struct_NumElements; i != e; ++i)
532-
Elts.push_back(DecodeFixedType(Infos, Tys, Context));
538+
Elts.push_back(DecodeFixedType(Infos, Tys, Context, DL));
533539
return StructType::get(Context, Elts);
534540
}
535541
case IITDescriptor::Argument:
@@ -562,7 +568,7 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
562568
return VectorType::getHalfElementsVectorType(
563569
cast<VectorType>(Tys[D.getArgumentNumber()]));
564570
case IITDescriptor::SameVecWidthArgument: {
565-
Type *EltTy = DecodeFixedType(Infos, Tys, Context);
571+
Type *EltTy = DecodeFixedType(Infos, Tys, Context, DL);
566572
Type *Ty = Tys[D.getArgumentNumber()];
567573
if (auto *VTy = dyn_cast<VectorType>(Ty))
568574
return VectorType::get(EltTy, VTy->getElementCount());
@@ -587,17 +593,18 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos,
587593
llvm_unreachable("unhandled");
588594
}
589595

590-
FunctionType *Intrinsic::getType(LLVMContext &Context, ID id,
591-
ArrayRef<Type *> Tys) {
596+
FunctionType *Intrinsic::getType(Module *M, ID id, ArrayRef<Type *> Tys) {
592597
SmallVector<IITDescriptor, 8> Table;
593598
getIntrinsicInfoTableEntries(id, Table);
594599

595600
ArrayRef<IITDescriptor> TableRef = Table;
596-
Type *ResultTy = DecodeFixedType(TableRef, Tys, Context);
601+
Type *ResultTy =
602+
DecodeFixedType(TableRef, Tys, M->getContext(), M->getDataLayout());
597603

598604
SmallVector<Type *, 8> ArgTys;
599605
while (!TableRef.empty())
600-
ArgTys.push_back(DecodeFixedType(TableRef, Tys, Context));
606+
ArgTys.push_back(
607+
DecodeFixedType(TableRef, Tys, M->getContext(), M->getDataLayout()));
601608

602609
// DecodeFixedType returns Void for IITDescriptor::Void and
603610
// IITDescriptor::VarArg If we see void type as the type of the last argument,
@@ -717,7 +724,7 @@ Function *Intrinsic::getOrInsertDeclaration(Module *M, ID id,
717724
ArrayRef<Type *> Tys) {
718725
// There can never be multiple globals with the same name of different types,
719726
// because intrinsics must be a specific type.
720-
auto *FT = getType(M->getContext(), id, Tys);
727+
auto *FT = getType(M, id, Tys);
721728
return cast<Function>(
722729
M->getOrInsertFunction(
723730
Tys.empty() ? getName(id) : getName(id, Tys, M, FT), FT)
@@ -772,7 +779,8 @@ using DeferredIntrinsicMatchPair =
772779
std::pair<Type *, ArrayRef<Intrinsic::IITDescriptor>>;
773780

774781
static bool
775-
matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
782+
matchIntrinsicType(const DataLayout &DL, Type *Ty,
783+
ArrayRef<Intrinsic::IITDescriptor> &Infos,
776784
SmallVectorImpl<Type *> &ArgTys,
777785
SmallVectorImpl<DeferredIntrinsicMatchPair> &DeferredChecks,
778786
bool IsDeferredCheck) {
@@ -795,6 +803,8 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
795803
switch (D.Kind) {
796804
case IITDescriptor::Void:
797805
return !Ty->isVoidTy();
806+
case IITDescriptor::Byte:
807+
return !Ty->isIntegerTy(DL.getByteWidth());
798808
case IITDescriptor::VarArg:
799809
return true;
800810
case IITDescriptor::MMX: {
@@ -828,7 +838,7 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
828838
case IITDescriptor::Vector: {
829839
VectorType *VT = dyn_cast<VectorType>(Ty);
830840
return !VT || VT->getElementCount() != D.Vector_Width ||
831-
matchIntrinsicType(VT->getElementType(), Infos, ArgTys,
841+
matchIntrinsicType(DL, VT->getElementType(), Infos, ArgTys,
832842
DeferredChecks, IsDeferredCheck);
833843
}
834844
case IITDescriptor::Pointer: {
@@ -843,7 +853,7 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
843853
return true;
844854

845855
for (unsigned i = 0, e = D.Struct_NumElements; i != e; ++i)
846-
if (matchIntrinsicType(ST->getElementType(i), Infos, ArgTys,
856+
if (matchIntrinsicType(DL, ST->getElementType(i), Infos, ArgTys,
847857
DeferredChecks, IsDeferredCheck))
848858
return true;
849859
return false;
@@ -933,7 +943,7 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
933943
return true;
934944
EltTy = ThisArgType->getElementType();
935945
}
936-
return matchIntrinsicType(EltTy, Infos, ArgTys, DeferredChecks,
946+
return matchIntrinsicType(DL, EltTy, Infos, ArgTys, DeferredChecks,
937947
IsDeferredCheck);
938948
}
939949
case IITDescriptor::VecOfAnyPtrsToElt: {
@@ -997,24 +1007,24 @@ matchIntrinsicType(Type *Ty, ArrayRef<Intrinsic::IITDescriptor> &Infos,
9971007
}
9981008

9991009
Intrinsic::MatchIntrinsicTypesResult
1000-
Intrinsic::matchIntrinsicSignature(FunctionType *FTy,
1010+
Intrinsic::matchIntrinsicSignature(const DataLayout &DL, FunctionType *FTy,
10011011
ArrayRef<Intrinsic::IITDescriptor> &Infos,
10021012
SmallVectorImpl<Type *> &ArgTys) {
10031013
SmallVector<DeferredIntrinsicMatchPair, 2> DeferredChecks;
1004-
if (matchIntrinsicType(FTy->getReturnType(), Infos, ArgTys, DeferredChecks,
1005-
false))
1014+
if (matchIntrinsicType(DL, FTy->getReturnType(), Infos, ArgTys,
1015+
DeferredChecks, false))
10061016
return MatchIntrinsicTypes_NoMatchRet;
10071017

10081018
unsigned NumDeferredReturnChecks = DeferredChecks.size();
10091019

10101020
for (auto *Ty : FTy->params())
1011-
if (matchIntrinsicType(Ty, Infos, ArgTys, DeferredChecks, false))
1021+
if (matchIntrinsicType(DL, Ty, Infos, ArgTys, DeferredChecks, false))
10121022
return MatchIntrinsicTypes_NoMatchArg;
10131023

10141024
for (unsigned I = 0, E = DeferredChecks.size(); I != E; ++I) {
10151025
DeferredIntrinsicMatchPair &Check = DeferredChecks[I];
1016-
if (matchIntrinsicType(Check.first, Check.second, ArgTys, DeferredChecks,
1017-
true))
1026+
if (matchIntrinsicType(DL, Check.first, Check.second, ArgTys,
1027+
DeferredChecks, true))
10181028
return I < NumDeferredReturnChecks ? MatchIntrinsicTypes_NoMatchRet
10191029
: MatchIntrinsicTypes_NoMatchArg;
10201030
}
@@ -1041,7 +1051,8 @@ bool Intrinsic::matchIntrinsicVarArg(
10411051
return true;
10421052
}
10431053

1044-
bool Intrinsic::getIntrinsicSignature(Intrinsic::ID ID, FunctionType *FT,
1054+
bool Intrinsic::getIntrinsicSignature(const DataLayout &DL, Intrinsic::ID ID,
1055+
FunctionType *FT,
10451056
SmallVectorImpl<Type *> &ArgTys) {
10461057
if (!ID)
10471058
return false;
@@ -1050,7 +1061,7 @@ bool Intrinsic::getIntrinsicSignature(Intrinsic::ID ID, FunctionType *FT,
10501061
getIntrinsicInfoTableEntries(ID, Table);
10511062
ArrayRef<Intrinsic::IITDescriptor> TableRef = Table;
10521063

1053-
if (Intrinsic::matchIntrinsicSignature(FT, TableRef, ArgTys) !=
1064+
if (Intrinsic::matchIntrinsicSignature(DL, FT, TableRef, ArgTys) !=
10541065
Intrinsic::MatchIntrinsicTypesResult::MatchIntrinsicTypes_Match) {
10551066
return false;
10561067
}
@@ -1061,8 +1072,8 @@ bool Intrinsic::getIntrinsicSignature(Intrinsic::ID ID, FunctionType *FT,
10611072

10621073
bool Intrinsic::getIntrinsicSignature(Function *F,
10631074
SmallVectorImpl<Type *> &ArgTys) {
1064-
return getIntrinsicSignature(F->getIntrinsicID(), F->getFunctionType(),
1065-
ArgTys);
1075+
return getIntrinsicSignature(F->getDataLayout(), F->getIntrinsicID(),
1076+
F->getFunctionType(), ArgTys);
10661077
}
10671078

10681079
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
@@ -5342,7 +5342,7 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
53425342
// Walk the descriptors to extract overloaded types.
53435343
SmallVector<Type *, 4> ArgTys;
53445344
Intrinsic::MatchIntrinsicTypesResult Res =
5345-
Intrinsic::matchIntrinsicSignature(IFTy, TableRef, ArgTys);
5345+
Intrinsic::matchIntrinsicSignature(DL, IFTy, TableRef, ArgTys);
53465346
Check(Res != Intrinsic::MatchIntrinsicTypes_NoMatchRet,
53475347
"Intrinsic has incorrect return type!", IF);
53485348
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
@@ -1591,7 +1591,7 @@ Value *NumericalStabilitySanitizer::maybeHandleKnownCallBase(
15911591
SmallVector<Type *, 4> ArgTys;
15921592
ArrayRef<Intrinsic::IITDescriptor> TableRef = Table;
15931593
[[maybe_unused]] Intrinsic::MatchIntrinsicTypesResult MatchResult =
1594-
Intrinsic::matchIntrinsicSignature(WidenedFnTy, TableRef, ArgTys);
1594+
Intrinsic::matchIntrinsicSignature(DL, WidenedFnTy, TableRef, ArgTys);
15951595
assert(MatchResult == Intrinsic::MatchIntrinsicTypes_Match &&
15961596
"invalid widened intrinsic");
15971597
// For known intrinsic functions, we create a second call to the same

0 commit comments

Comments
 (0)