[llvm] 7fe4fa9 - [LV] Use onlyFirstLaneDemanded when widening pointer phis (NFCI).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 1 01:51:04 PST 2022
Author: Florian Hahn
Date: 2022-02-01T09:50:47Z
New Revision: 7fe4fa9a0a9b710b931887a9484ae09fb6323ca9
URL: https://github.com/llvm/llvm-project/commit/7fe4fa9a0a9b710b931887a9484ae09fb6323ca9
DIFF: https://github.com/llvm/llvm-project/commit/7fe4fa9a0a9b710b931887a9484ae09fb6323ca9.diff
LOG: [LV] Use onlyFirstLaneDemanded when widening pointer phis (NFCI).
This removes another instance of recipe execution still relying on
the cost model.
Depends on D116554.
Reviewed By: david-arm
Differential Revision: https://reviews.llvm.org/D116656
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 8e11f3de192f4..b0a316ffff8d6 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4502,7 +4502,7 @@ void InnerLoopVectorizer::widenPHIInstruction(Instruction *PN,
// Determine the number of scalars we need to generate for each unroll
// iteration. If the instruction is uniform, we only need to generate the
// first lane. Otherwise, we generate all VF values.
- bool IsUniform = Cost->isUniformAfterVectorization(P, State.VF);
+ bool IsUniform = vputils::onlyFirstLaneUsed(PhiR);
assert((IsUniform || !State.VF.isScalable()) &&
"Cannot scalarize a scalable VF");
unsigned Lanes = IsUniform ? 1 : State.VF.getFixedValue();
More information about the llvm-commits
mailing list