Skip to content

Commit 8f27a14

Browse files
author
Simon Moll
committed
[fix] strided load|store intrinsic declarations
1 parent 0e0d34a commit 8f27a14

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

llvm/lib/IR/IntrinsicInst.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,13 +618,13 @@ static VPIntrinsic::ShortTypeVec getVPIntrinsicTypes(Intrinsic::ID ID,
618618
return VPIntrinsic::ShortTypeVec{VectorTy};
619619

620620
case Intrinsic::experimental_vp_strided_load:
621-
return VPIntrinsic::ShortTypeVec{VecRetTy, VecPtrTy,
622-
Type::getInt64Ty(VectorTy->getContext())};
621+
return VPIntrinsic::ShortTypeVec{VecRetTy,
622+
Type::getInt64Ty(VecRetTy->getContext())};
623623
case Intrinsic::vp_gather:
624624
case Intrinsic::vp_load:
625625
return VPIntrinsic::ShortTypeVec{VecRetTy, VecPtrTy};
626626
case Intrinsic::experimental_vp_strided_store:
627-
return VPIntrinsic::ShortTypeVec{VectorTy, VecPtrTy,
627+
return VPIntrinsic::ShortTypeVec{VectorTy,
628628
Type::getInt64Ty(VectorTy->getContext())};
629629
case Intrinsic::vp_scatter:
630630
case Intrinsic::vp_store:

llvm/lib/IR/VPBuilder.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,10 @@ Value &VPBuilder::CreateStridedLoad(Type *ReturnTy, Value &Ptr,
178178
MaybeAlign AlignOpt, int64_t Stride) {
179179
auto &ElemPtr = GetAsElementPointer(Ptr);
180180
// auto &VecTy = getVectorType(*ElemPtr.getType()->getPointerElementType());
181-
auto *LoadFunc = VPIntrinsic::getDeclarationForParams(
182-
&getModule(), Intrinsic::experimental_vp_strided_load, ReturnTy,
183-
{&ElemPtr});
184181
auto *StrideConst = Builder.getInt64((uint64_t)Stride);
185182
ShortValueVec Args{&ElemPtr, StrideConst, &RequestPred(), &RequestEVL()};
183+
auto *LoadFunc = VPIntrinsic::getDeclarationForParams(
184+
&getModule(), Intrinsic::experimental_vp_strided_load, ReturnTy, Args);
186185
CallInst &LoadCall = *Builder.CreateCall(LoadFunc, Args);
187186
if (AlignOpt.hasValue()) {
188187
unsigned PtrPos =

0 commit comments

Comments
 (0)