Skip to content

Commit aaca261

Browse files
committed
Remove VPInstruction::MergeUntilPivot
1 parent 1fbefc5 commit aaca261

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
@@ -1279,11 +1279,6 @@ class VPInstruction : public VPRecipeWithIRFlags,
12791279
// operand). Only generates scalar values (either for the first lane only or
12801280
// for all lanes, depending on its uses).
12811281
PtrAdd,
1282-
// Selects elements from two vectors (second and third operand) based on a
1283-
// condition vector (first operand) and a pivot index (fourth operand). The
1284-
// lanes whose positions are greater than or equal to the pivot are taken
1285-
// from the third operand.
1286-
MergeUntilPivot,
12871282
};
12881283

12891284
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;
@@ -679,16 +678,7 @@ Value *VPInstruction::generate(VPTransformState &State) {
679678
}
680679
return NewPhi;
681680
}
682-
case VPInstruction::MergeUntilPivot: {
683-
Value *Cond = State.get(getOperand(0));
684-
Value *OnTrue = State.get(getOperand(1));
685-
Value *OnFalse = State.get(getOperand(2));
686-
Value *Pivot = State.get(getOperand(3), /* IsScalar */ true);
687-
assert(Pivot->getType()->isIntegerTy() && "Pivot should be an integer.");
688-
return Builder.CreateIntrinsic(Intrinsic::vp_merge, {OnTrue->getType()},
689-
{Cond, OnTrue, OnFalse, Pivot}, nullptr,
690-
Name);
691-
}
681+
692682
default:
693683
llvm_unreachable("Unsupported opcode for instruction");
694684
}
@@ -770,9 +760,6 @@ bool VPInstruction::onlyFirstLaneUsed(const VPValue *Op) const {
770760
case VPInstruction::BranchOnCond:
771761
case VPInstruction::ResumePhi:
772762
return true;
773-
case VPInstruction::MergeUntilPivot:
774-
// Pivot must be an integer.
775-
return Op == getOperand(3);
776763
};
777764
llvm_unreachable("switch should return");
778765
}
@@ -791,7 +778,6 @@ bool VPInstruction::onlyFirstPartUsed(const VPValue *Op) const {
791778
case VPInstruction::BranchOnCount:
792779
case VPInstruction::BranchOnCond:
793780
case VPInstruction::CanonicalIVIncrementForPart:
794-
case VPInstruction::MergeUntilPivot:
795781
return true;
796782
};
797783
llvm_unreachable("switch should return");
@@ -858,9 +844,6 @@ void VPInstruction::print(raw_ostream &O, const Twine &Indent,
858844
case VPInstruction::PtrAdd:
859845
O << "ptradd";
860846
break;
861-
case VPInstruction::MergeUntilPivot:
862-
O << "merge-until-pivot";
863-
break;
864847
default:
865848
O << Instruction::getOpcodeName(getOpcode());
866849
}

0 commit comments

Comments
 (0)