[all-commits] [llvm/llvm-project] 6c95a9: [LV] Narrow truncated inductions in a VPlan transf...
Vedant Paranjape via All-commits
all-commits at lists.llvm.org
Tue Sep 22 20:05:12 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6c95a9274885a7c0490cd8bc67ae7549f479d825
https://github.com/llvm/llvm-project/commit/6c95a9274885a7c0490cd8bc67ae7549f479d825
Author: Vedant Paranjape <veparanjape at microsoft.com>
Date: 2026-09-22 (Tue, 22 Sep 2026)
Changed paths:
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
M llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
M llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
M llvm/lib/Transforms/Vectorize/VPlanTransforms.h
M llvm/test/Transforms/LoopVectorize/VPlan/vplan-print-before-after-all.ll
M llvm/test/Transforms/LoopVectorize/cast-induction.ll
Log Message:
-----------
[LV] Narrow truncated inductions in a VPlan transform (#220730)
VPRecipeBuilder::tryToOptimizeInductionTruncate matched a truncate of an
induction phi on the underlying IR, and it built the narrowed
VPWidenIntOrFpInductionRecipe from the recipe behind the truncate's
operand.
VPlanTransforms already answers the same question on VPValues in
getOptimizableIVOf, which returns the header IV whether the operand is
the IV
itself or an add of the IV and its step.
Add VPlanTransforms::narrowInductionTruncates and do the match there,
reusing
getOptimizableIVOf and restricting it to the phi for now. The pass runs
right
after makeCallWideningDecisions, which preserves the ordering against
makeScalarizationDecisions that the recipe builder relied on. Building
the
recipe in the transform also removes the need for the conversion loop to
special case a truncate and move the recipe into the header phi section,
because the transform inserts it there directly.
Assisted-By: Claude Opus 5
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list