Skip to content

Commit 44b24f4

Browse files
committed
[VPlan] Forbid things like ComputeReductionResult
1 parent fc05512 commit 44b24f4

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
@@ -1416,7 +1416,10 @@ static void narrowToSingleScalarRecipes(VPlan &Plan) {
14161416
return true;
14171417

14181418
if (auto *VPI = dyn_cast<VPInstruction>(U))
1419-
if (VPI->isVectorToScalar() || VPI->isSingleScalar())
1419+
if (VPI->isSingleScalar() ||
1420+
VPI->getOpcode() == VPInstruction::ExtractLastElement ||
1421+
VPI->getOpcode() == VPInstruction::ExtractLastLanePerPart ||
1422+
VPI->getOpcode() == VPInstruction::ExtractPenultimateElement)
14201423
return true;
14211424

14221425
return U->usesScalars(RepOrWidenR);

0 commit comments

Comments
 (0)