[llvm] [VPlan] Treat VPVector(End)PointerRecipe as single-scalar, if ops are. (PR #169249)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 23 14:16:24 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-vectorizers
Author: Florian Hahn (fhahn)
<details>
<summary>Changes</summary>
VPVector(End)PointerRecipes are single-scalar if all their operands are. This should be effectively NFC currently, but it should re-enable cost checking for some more VPWidenMemoryRecipe after
https://github.com/llvm/llvm-project/pull/157387 as discovered by @<!-- -->john-brawn-arm.
---
Full diff: https://github.com/llvm/llvm-project/pull/169249.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Vectorize/VPlanUtils.cpp (+2-1)
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp b/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
index 939216fe162a4..334ad973c5428 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
@@ -185,7 +185,8 @@ bool vputils::isSingleScalar(const VPValue *VPV) {
all_of(Rep->operands(), isSingleScalar));
}
if (isa<VPWidenGEPRecipe, VPDerivedIVRecipe, VPBlendRecipe,
- VPWidenSelectRecipe>(VPV))
+ VPWidenSelectRecipe, VPVectorPointerRecipe, VPVectorEndPointerRecipe>(
+ VPV))
return all_of(VPV->getDefiningRecipe()->operands(), isSingleScalar);
if (auto *WidenR = dyn_cast<VPWidenRecipe>(VPV)) {
return preservesUniformity(WidenR->getOpcode()) &&
``````````
</details>
https://github.com/llvm/llvm-project/pull/169249
More information about the llvm-commits
mailing list