Skip to content

Commit 4b0b896

Browse files
committed
[VPlan] Forbid things like ComputeReductionResult
1 parent 434b246 commit 4b0b896

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,10 @@ static void narrowToSingleScalarRecipes(VPlan &Plan) {
14231423
return true;
14241424

14251425
if (auto *VPI = dyn_cast<VPInstruction>(U))
1426-
if (VPI->isVectorToScalar() || VPI->isSingleScalar())
1426+
if (VPI->isSingleScalar() ||
1427+
VPI->getOpcode() == VPInstruction::ExtractLastElement ||
1428+
VPI->getOpcode() == VPInstruction::ExtractLastLanePerPart ||
1429+
VPI->getOpcode() == VPInstruction::ExtractPenultimateElement)
14271430
return true;
14281431

14291432
return U->usesScalars(RepOrWidenR);

0 commit comments

Comments
 (0)