Skip to content

Commit a4fb44b

Browse files
committed
Remove VPInstruction::MergeUntilPivot
1 parent ccb4269 commit a4fb44b

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,11 +1277,6 @@ class VPInstruction : public VPRecipeWithIRFlags,
12771277
// operand). Only generates scalar values (either for the first lane only or
12781278
// for all lanes, depending on its uses).
12791279
PtrAdd,
1280-
// Selects elements from two vectors (second and third operand) based on a
1281-
// condition vector (first operand) and a pivot index (fourth operand). The
1282-
// lanes whose positions are greater than or equal to the pivot are taken
1283-
// from the third operand.
1284-
MergeUntilPivot,
12851280
};
12861281

12871282
private:

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ bool VPRecipeBase::mayWriteToMemory() const {
6565
case VPInstruction::FirstOrderRecurrenceSplice:
6666
case VPInstruction::LogicalAnd:
6767
case VPInstruction::PtrAdd:
68-
case VPInstruction::MergeUntilPivot:
6968
return false;
7069
default:
7170
return true;
@@ -678,16 +677,7 @@ Value *VPInstruction::generate(VPTransformState &State) {
678677
}
679678
return NewPhi;
680679
}
681-
case VPInstruction::MergeUntilPivot: {
682-
Value *Cond = State.get(getOperand(0));
683-
Value *OnTrue = State.get(getOperand(1));
684-
Value *OnFalse = State.get(getOperand(2));
685-
Value *Pivot = State.get(getOperand(3), /* IsScalar */ true);
686-
assert(Pivot->getType()->isIntegerTy() && "Pivot should be an integer.");
687-
return Builder.CreateIntrinsic(Intrinsic::vp_merge, {OnTrue->getType()},
688-
{Cond, OnTrue, OnFalse, Pivot}, nullptr,
689-
Name);
690-
}
680+
691681
default:
692682
llvm_unreachable("Unsupported opcode for instruction");
693683
}
@@ -769,9 +759,6 @@ bool VPInstruction::onlyFirstLaneUsed(const VPValue *Op) const {
769759
case VPInstruction::BranchOnCond:
770760
case VPInstruction::ResumePhi:
771761
return true;
772-
case VPInstruction::MergeUntilPivot:
773-
// Pivot must be an integer.
774-
return Op == getOperand(3);
775762
};
776763
llvm_unreachable("switch should return");
777764
}
@@ -790,7 +777,6 @@ bool VPInstruction::onlyFirstPartUsed(const VPValue *Op) const {
790777
case VPInstruction::BranchOnCount:
791778
case VPInstruction::BranchOnCond:
792779
case VPInstruction::CanonicalIVIncrementForPart:
793-
case VPInstruction::MergeUntilPivot:
794780
return true;
795781
};
796782
llvm_unreachable("switch should return");
@@ -857,9 +843,6 @@ void VPInstruction::print(raw_ostream &O, const Twine &Indent,
857843
case VPInstruction::PtrAdd:
858844
O << "ptradd";
859845
break;
860-
case VPInstruction::MergeUntilPivot:
861-
O << "merge-until-pivot";
862-
break;
863846
default:
864847
O << Instruction::getOpcodeName(getOpcode());
865848
}

0 commit comments

Comments
 (0)