[llvm] [LV] Convert gather loads with invariant stride into strided loads (PR #147297)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 9 05:37:14 PST 2025
================
@@ -1797,6 +1806,125 @@ void VPWidenIntrinsicRecipe::printRecipe(raw_ostream &O, const Twine &Indent,
}
#endif
+unsigned VPWidenMemIntrinsicRecipe::getMemoryPointerParamPos() const {
+ if (auto Pos = VPIntrinsic::getMemoryPointerParamPos(VectorIntrinsicID))
+ return *Pos;
+
+ switch (VectorIntrinsicID) {
+ case Intrinsic::masked_load:
+ case Intrinsic::masked_gather:
+ case Intrinsic::masked_expandload:
+ return 0;
+ case Intrinsic::masked_store:
+ case Intrinsic::masked_scatter:
+ case Intrinsic::masked_compressstore:
+ return 1;
+ default:
+ llvm_unreachable("unknown vector memory intrinsic");
----------------
Mel-Chen wrote:
5b5ef06b22d0dc9543a085bf821333ea2bfc7a34
I narrowed the feature of VPWidenMemIntrinsicRecipe. Now only for Intrinsic::experimental_vp_strided_load.
https://github.com/llvm/llvm-project/pull/147297
More information about the llvm-commits
mailing list