Skip to content

Commit 21ac5c8

Browse files
committed
[VPlan] Remove duplicated ExtractFromEnd handling from unoll (NFC).
ExtractFromEnd is already handled earlier, remove duplicated code.
1 parent 9f33eb8 commit 21ac5c8

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

llvm/lib/Transforms/Vectorize/VPlanUnroll.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -264,24 +264,6 @@ void UnrollState::unrollRecipeByUF(VPRecipeBase &R) {
264264
return;
265265

266266
if (auto *VPI = dyn_cast<VPInstruction>(&R)) {
267-
VPValue *Op0, *Op1;
268-
if (match(VPI, m_VPInstruction<VPInstruction::ExtractFromEnd>(
269-
m_VPValue(Op0), m_VPValue(Op1)))) {
270-
VPI->setOperand(1, getValueForPart(Op1, UF - 1));
271-
addUniformForAllParts(VPI);
272-
if (Plan.hasScalarVFOnly()) {
273-
// Extracting from end with VF = 1 implies retrieving the scalar part UF
274-
// - Op1.
275-
unsigned Offset =
276-
cast<ConstantInt>(Op1->getLiveInIRValue())->getZExtValue();
277-
VPI->replaceAllUsesWith(getValueForPart(Op0, UF - Offset));
278-
} else {
279-
// Otherwise we extract from the last part.
280-
remapOperands(VPI, UF - 1);
281-
}
282-
return;
283-
}
284-
285267
if (vputils::onlyFirstPartUsed(VPI)) {
286268
addUniformForAllParts(VPI);
287269
return;

0 commit comments

Comments
 (0)