Skip to content

Commit 7fe4fa9

Browse files
committed
[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
1 parent daa8033 commit 7fe4fa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4502,7 +4502,7 @@ void InnerLoopVectorizer::widenPHIInstruction(Instruction *PN,
45024502
// Determine the number of scalars we need to generate for each unroll
45034503
// iteration. If the instruction is uniform, we only need to generate the
45044504
// first lane. Otherwise, we generate all VF values.
4505-
bool IsUniform = Cost->isUniformAfterVectorization(P, State.VF);
4505+
bool IsUniform = vputils::onlyFirstLaneUsed(PhiR);
45064506
assert((IsUniform || !State.VF.isScalable()) &&
45074507
"Cannot scalarize a scalable VF");
45084508
unsigned Lanes = IsUniform ? 1 : State.VF.getFixedValue();

0 commit comments

Comments
 (0)