@@ -1196,7 +1196,7 @@ void VPIRPhi::execute(VPTransformState &State) {
11961196 PHINode *Phi = &getIRPhi ();
11971197 for (const auto &[Idx, Op] : enumerate(operands ())) {
11981198 VPValue *ExitValue = Op;
1199- auto Lane = vputils::isUniformAfterVectorization (ExitValue)
1199+ auto Lane = vputils::isSingleScalar (ExitValue)
12001200 ? VPLane::getFirstLane ()
12011201 : VPLane::getLastLaneForVF (State.VF );
12021202 VPBlockBase *Pred = getParent ()->getPredecessors ()[Idx];
@@ -2679,7 +2679,7 @@ static void scalarizeInstruction(const Instruction *Instr,
26792679 for (const auto &I : enumerate(RepRecipe->operands ())) {
26802680 auto InputLane = Lane;
26812681 VPValue *Operand = I.value ();
2682- if (vputils::isUniformAfterVectorization (Operand))
2682+ if (vputils::isSingleScalar (Operand))
26832683 InputLane = VPLane::getFirstLane ();
26842684 Cloned->setOperand (I.index (), State.get (Operand, InputLane));
26852685 }
@@ -2705,7 +2705,7 @@ static void scalarizeInstruction(const Instruction *Instr,
27052705void VPReplicateRecipe::execute (VPTransformState &State) {
27062706 Instruction *UI = getUnderlyingInstr ();
27072707 if (State.Lane ) { // Generate a single instance.
2708- assert ((State.VF .isScalar () || !isUniform ()) &&
2708+ assert ((State.VF .isScalar () || !isSingleScalar ()) &&
27092709 " uniform recipe shouldn't be predicated" );
27102710 assert (!State.VF .isScalable () && " Can't scalarize a scalable vector" );
27112711 scalarizeInstruction (UI, this , *State.Lane , State);
@@ -2723,16 +2723,15 @@ void VPReplicateRecipe::execute(VPTransformState &State) {
27232723 return ;
27242724 }
27252725
2726- if (IsUniform ) {
2726+ if (IsSingleScalar ) {
27272727 // Uniform within VL means we need to generate lane 0.
27282728 scalarizeInstruction (UI, this , VPLane (0 ), State);
27292729 return ;
27302730 }
27312731
27322732 // A store of a loop varying value to a uniform address only needs the last
27332733 // copy of the store.
2734- if (isa<StoreInst>(UI) &&
2735- vputils::isUniformAfterVectorization (getOperand (1 ))) {
2734+ if (isa<StoreInst>(UI) && vputils::isSingleScalar (getOperand (1 ))) {
27362735 auto Lane = VPLane::getLastLaneForVF (State.VF );
27372736 scalarizeInstruction (UI, this , VPLane (Lane), State);
27382737 return ;
@@ -2793,7 +2792,7 @@ InstructionCost VPReplicateRecipe::computeCost(ElementCount VF,
27932792 UI->getOpcode (), ResultTy, CostKind,
27942793 {TargetTransformInfo::OK_AnyValue, TargetTransformInfo::OP_None},
27952794 Op2Info, Operands, UI, &Ctx.TLI ) *
2796- (isUniform () ? 1 : VF.getKnownMinValue ());
2795+ (isSingleScalar () ? 1 : VF.getKnownMinValue ());
27972796 }
27982797 }
27992798
@@ -2803,7 +2802,7 @@ InstructionCost VPReplicateRecipe::computeCost(ElementCount VF,
28032802#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
28042803void VPReplicateRecipe::print (raw_ostream &O, const Twine &Indent,
28052804 VPSlotTracker &SlotTracker) const {
2806- O << Indent << (IsUniform ? " CLONE " : " REPLICATE " );
2805+ O << Indent << (IsSingleScalar ? " CLONE " : " REPLICATE " );
28072806
28082807 if (!getUnderlyingInstr ()->getType ()->isVoidTy ()) {
28092808 printAsOperand (O, SlotTracker);
0 commit comments