[llvm] [VPlan] Implement VPlan-based unit-strideness speculation (PR #182595)
Andrei Elovikov via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 07:05:44 PDT 2026
================
@@ -5641,33 +5647,34 @@ void VPlanTransforms::multiversionForUnitStridedMemOps(
StridePredicates = StridePredicates.getUnionWith(NewPred, *SE);
- auto ReplaceUsesInVectorLoop = [&](Value *V, const SCEV *ToSCEV) {
+ // Replace the stride and all integral casts derived from it. Some casts
+ // might be defined outside VPlan and modeled as live-ins only, so we need
+ // to process users at the LLVM IR level in order to discover them.
+ auto ReplaceUsesInVectorLoopThroughCastsRecursively =
+ [&](auto &Self, Value *V, const SCEV *ToSCEV) -> void {
----------------
eas wrote:
Either works for me, so extracted in the latest upload.
https://github.com/llvm/llvm-project/pull/182595
More information about the llvm-commits
mailing list