[PATCH] D116656: [LV] Use onlyFirstLaneDemanded when widening pointer phis (NFCI).
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 5 05:15:37 PST 2022
fhahn created this revision.
fhahn added reviewers: david-arm, gilr, Ayal.
Herald added a subscriber: hiraditya.
fhahn requested review of this revision.
Herald added a project: LLVM.
This removes another instance of recipe execution still relying on
the cost model.
Depends on D116554 <https://reviews.llvm.org/D116554>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116656
Files:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Index: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4498,7 +4498,7 @@
// 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::onlyFirstLaneDemanded(PhiR);
assert((IsUniform || !State.VF.isScalable()) &&
"Cannot scalarize a scalable VF");
unsigned Lanes = IsUniform ? 1 : State.VF.getFixedValue();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116656.397540.patch
Type: text/x-patch
Size: 772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220105/739acb5c/attachment.bin>
More information about the llvm-commits
mailing list