Skip to content

Commit ac735e7

Browse files
committed
[VPlan] Forbid things like ComputeReductionResult
1 parent 9005774 commit ac735e7

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

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

14301433
return U->usesScalars(RepOrWidenR);

0 commit comments

Comments
 (0)