}
}
-/// Return true if this VPValue represents a computation which is
-/// uniform-per-part.
-static bool isUniform(VPValue *VPV) {
- if (VPReplicateRecipe *OperandR = dyn_cast<VPReplicateRecipe>(VPV))
- return OperandR->isUniform();
- return false;
-}
-
void InnerLoopVectorizer::scalarizeInstruction(Instruction *Instr,
VPReplicateRecipe *RepRecipe,
const VPIteration &Instance,
for (const auto &I : enumerate(RepRecipe->operands())) {
auto InputInstance = Instance;
VPValue *Operand = I.value();
- if (isUniform(Operand))
+ if (vputils::isUniformAfterVectorization(Operand))
InputInstance.Lane = VPLane::getFirstLane();
Cloned->setOperand(I.index(), State.get(Operand, InputInstance));
}
return ScalarValue;
}
- bool IsUniform = isUniform(Def);
+ bool IsUniform = vputils::isUniformAfterVectorization(Def);
unsigned LastLane = IsUniform ? 0 : VF.getKnownMinValue() - 1;
// Check if there is a scalar value for the selected lane.