@@ -1190,7 +1190,7 @@ void VPIRPhi::execute(VPTransformState &State) {
11901190 PHINode *Phi = &getIRPhi ();
11911191 for (const auto &[Idx, Op] : enumerate(operands ())) {
11921192 VPValue *ExitValue = Op;
1193- auto Lane = vputils::isUniformAfterVectorization (ExitValue)
1193+ auto Lane = vputils::isSingleScalar (ExitValue)
11941194 ? VPLane::getFirstLane ()
11951195 : VPLane::getLastLaneForVF (State.VF );
11961196 VPBlockBase *Pred = getParent ()->getPredecessors ()[Idx];
@@ -2624,7 +2624,7 @@ static void scalarizeInstruction(const Instruction *Instr,
26242624 for (const auto &I : enumerate(RepRecipe->operands ())) {
26252625 auto InputLane = Lane;
26262626 VPValue *Operand = I.value ();
2627- if (vputils::isUniformAfterVectorization (Operand))
2627+ if (vputils::isSingleScalar (Operand))
26282628 InputLane = VPLane::getFirstLane ();
26292629 Cloned->setOperand (I.index (), State.get (Operand, InputLane));
26302630 }
@@ -2650,7 +2650,7 @@ static void scalarizeInstruction(const Instruction *Instr,
26502650void VPReplicateRecipe::execute (VPTransformState &State) {
26512651 Instruction *UI = getUnderlyingInstr ();
26522652 if (State.Lane ) { // Generate a single instance.
2653- assert ((State.VF .isScalar () || !isUniform ()) &&
2653+ assert ((State.VF .isScalar () || !isSingleScalar ()) &&
26542654 " uniform recipe shouldn't be predicated" );
26552655 assert (!State.VF .isScalable () && " Can't scalarize a scalable vector" );
26562656 scalarizeInstruction (UI, this , *State.Lane , State);
@@ -2668,16 +2668,15 @@ void VPReplicateRecipe::execute(VPTransformState &State) {
26682668 return ;
26692669 }
26702670
2671- if (IsUniform ) {
2671+ if (IsSingleScalar ) {
26722672 // Uniform within VL means we need to generate lane 0.
26732673 scalarizeInstruction (UI, this , VPLane (0 ), State);
26742674 return ;
26752675 }
26762676
26772677 // A store of a loop varying value to a uniform address only needs the last
26782678 // copy of the store.
2679- if (isa<StoreInst>(UI) &&
2680- vputils::isUniformAfterVectorization (getOperand (1 ))) {
2679+ if (isa<StoreInst>(UI) && vputils::isSingleScalar (getOperand (1 ))) {
26812680 auto Lane = VPLane::getLastLaneForVF (State.VF );
26822681 scalarizeInstruction (UI, this , VPLane (Lane), State);
26832682 return ;
@@ -2738,7 +2737,7 @@ InstructionCost VPReplicateRecipe::computeCost(ElementCount VF,
27382737 UI->getOpcode (), ResultTy, CostKind,
27392738 {TargetTransformInfo::OK_AnyValue, TargetTransformInfo::OP_None},
27402739 Op2Info, Operands, UI, &Ctx.TLI ) *
2741- (isUniform () ? 1 : VF.getKnownMinValue ());
2740+ (isSingleScalar () ? 1 : VF.getKnownMinValue ());
27422741 }
27432742 }
27442743
@@ -2748,7 +2747,7 @@ InstructionCost VPReplicateRecipe::computeCost(ElementCount VF,
27482747#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
27492748void VPReplicateRecipe::print (raw_ostream &O, const Twine &Indent,
27502749 VPSlotTracker &SlotTracker) const {
2751- O << Indent << (IsUniform ? " CLONE " : " REPLICATE " );
2750+ O << Indent << (IsSingleScalar ? " CLONE " : " REPLICATE " );
27522751
27532752 if (!getUnderlyingInstr ()->getType ()->isVoidTy ()) {
27542753 printAsOperand (O, SlotTracker);
0 commit comments