Skip to content

Commit 048f190

Browse files
committed
Remove VPInstruction::MergeUntilPivot
1 parent 7e20f0f commit 048f190

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
@@ -1274,11 +1274,6 @@ class VPInstruction : public VPRecipeWithIRFlags,
12741274
// operand). Only generates scalar values (either for the first lane only or
12751275
// for all lanes, depending on its uses).
12761276
PtrAdd,
1277-
// Selects elements from two vectors (second and third operand) based on a
1278-
// condition vector (first operand) and a pivot index (fourth operand). The
1279-
// lanes whose positions are greater than or equal to the pivot are taken
1280-
// from the third operand.
1281-
MergeUntilPivot,
12821277
};
12831278

12841279
private:

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ bool VPRecipeBase::mayWriteToMemory() const {
6363
case VPInstruction::FirstOrderRecurrenceSplice:
6464
case VPInstruction::LogicalAnd:
6565
case VPInstruction::PtrAdd:
66-
case VPInstruction::MergeUntilPivot:
6766
return false;
6867
default:
6968
return true;
@@ -673,16 +672,7 @@ Value *VPInstruction::generate(VPTransformState &State) {
673672
}
674673
return NewPhi;
675674
}
676-
case VPInstruction::MergeUntilPivot: {
677-
Value *Cond = State.get(getOperand(0));
678-
Value *OnTrue = State.get(getOperand(1));
679-
Value *OnFalse = State.get(getOperand(2));
680-
Value *Pivot = State.get(getOperand(3), /* IsScalar */ true);
681-
assert(Pivot->getType()->isIntegerTy() && "Pivot should be an integer.");
682-
return Builder.CreateIntrinsic(Intrinsic::vp_merge, {OnTrue->getType()},
683-
{Cond, OnTrue, OnFalse, Pivot}, nullptr,
684-
Name);
685-
}
675+
686676
default:
687677
llvm_unreachable("Unsupported opcode for instruction");
688678
}
@@ -763,9 +753,6 @@ bool VPInstruction::onlyFirstLaneUsed(const VPValue *Op) const {
763753
case VPInstruction::BranchOnCond:
764754
case VPInstruction::ResumePhi:
765755
return true;
766-
case VPInstruction::MergeUntilPivot:
767-
// Pivot must be an integer.
768-
return Op == getOperand(3);
769756
};
770757
llvm_unreachable("switch should return");
771758
}
@@ -784,7 +771,6 @@ bool VPInstruction::onlyFirstPartUsed(const VPValue *Op) const {
784771
case VPInstruction::BranchOnCount:
785772
case VPInstruction::BranchOnCond:
786773
case VPInstruction::CanonicalIVIncrementForPart:
787-
case VPInstruction::MergeUntilPivot:
788774
return true;
789775
};
790776
llvm_unreachable("switch should return");
@@ -851,9 +837,6 @@ void VPInstruction::print(raw_ostream &O, const Twine &Indent,
851837
case VPInstruction::PtrAdd:
852838
O << "ptradd";
853839
break;
854-
case VPInstruction::MergeUntilPivot:
855-
O << "merge-until-pivot";
856-
break;
857840
default:
858841
O << Instruction::getOpcodeName(getOpcode());
859842
}

0 commit comments

Comments
 (0)