[llvm] [VPlan] Rename isUniform(AfterVectorization) to isSingleScalar (NFC). (PR #140134)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 16 08:27:01 PDT 2025
================
@@ -643,12 +643,11 @@ static void legalizeAndOptimizeInductions(VPlan &Plan) {
// Skip recipes that shouldn't be narrowed.
if (!Def || !isa<VPReplicateRecipe, VPWidenRecipe>(Def) ||
Def->getNumUsers() == 0 || !Def->getUnderlyingValue() ||
- (RepR && (RepR->isUniform() || RepR->isPredicated())))
+ (RepR && (RepR->isSingleScalar() || RepR->isPredicated())))
continue;
// Skip recipes that may have other lanes than their first used.
- if (!vputils::isUniformAfterVectorization(Def) &&
- !vputils::onlyFirstLaneUsed(Def))
+ if (!vputils::isSingleScalar(Def) && !vputils::onlyFirstLaneUsed(Def))
----------------
ayalz wrote:
`isSingleScalar` describes the result - a single scalar value suffices - which stems from above: how the values per lanes were defined, namely, produced equal aka uniform (or undefined for all lanes except one); and/or from below: how many values will be needed, used. Analogous to narrowing bitwidth based on value range analysis and/or demanded bits analysis.
https://github.com/llvm/llvm-project/pull/140134
More information about the llvm-commits
mailing list