[LV] Use VPReplicateRecipe::isUniform instead isUniformAfterVec (NFCI).

In scalarizeInstruction(), isUniformAfterVectorization is used to detect
cases where it is sufficient to always access the first lane. This
should map directly checking whether the operand is a uniform replicate
recipe.

Differential Revision: https://reviews.llvm.org/D116654
This commit is contained in:
Florian Hahn 2022-02-06 16:37:20 +00:00
parent 7275de7fb2
commit 541ca12dcd
No known key found for this signature in database
GPG Key ID: EEF712BB5E80EBBA

View File

@ -2945,7 +2945,8 @@ void InnerLoopVectorizer::scalarizeInstruction(Instruction *Instr,
for (auto &I : enumerate(RepRecipe->operands())) {
auto InputInstance = Instance;
VPValue *Operand = I.value();
if (State.Plan->isUniformAfterVectorization(Operand))
VPReplicateRecipe *OperandR = dyn_cast<VPReplicateRecipe>(Operand);
if (OperandR && OperandR->isUniform())
InputInstance.Lane = VPLane::getFirstLane();
Cloned->setOperand(I.index(), State.get(Operand, InputInstance));
}