[llvm] [LV][VPlan] Use VF VPValue in VPVectorPointerRecipe (PR #110974)
Shih-Po Hung via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 09:06:36 PDT 2024
================
@@ -1813,38 +1813,59 @@ void VPWidenGEPRecipe::print(raw_ostream &O, const Twine &Indent,
}
#endif
+void VPReverseVectorPointerRecipe ::execute(VPTransformState &State) {
+ auto &Builder = State.Builder;
+ State.setDebugLocFrom(getDebugLoc());
+ unsigned CurrentPart = getUnrollPart(*this);
+ // Use i32 for the gep index type when the value is constant,
+ // or query DataLayout for a more suitable index type otherwise.
+ const DataLayout &DL = Builder.GetInsertBlock()->getDataLayout();
+ Type *IndexTy = State.VF.isScalable()
+ ? DL.getIndexType(IndexedTy->getPointerTo())
+ : Builder.getInt32Ty();
----------------
arcbbb wrote:
Sure, I move them to getGEPIndexTy().
https://github.com/llvm/llvm-project/pull/110974
More information about the llvm-commits
mailing list