[llvm] [VPlan] Dissolve replicate regions with vector live-outs. (PR #189022)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 22 10:58:14 PDT 2026
================
@@ -753,10 +758,25 @@ static void processLaneForReplicateRegion(VPlan &Plan, Type *IdxTy,
NewR.setOperand(I, NewOp);
}
+ const APInt *InsertExtractIdx;
if (auto *Steps = dyn_cast<VPScalarIVStepsRecipe>(&NewR))
addLaneToStartIndex(Steps, Lane, Plan, Steps);
- else if (match(&NewR, m_ExtractElement(m_VPValue(), m_ZeroInt())))
+ else if (match(&NewR, m_ExtractElement(m_VPValue(),
+ m_APInt(InsertExtractIdx)))) {
+ assert(InsertExtractIdx->isZero() && "insert indices must be zero");
NewR.setOperand(1, IdxLane);
+ } else if (isa<VPPhi>(&OldR)) {
+ // Update BuildStructVector operand for this lane.
+ VPUser *SingleUser = OldR.getVPSingleValue()->getSingleUser();
+ if (SingleUser &&
----------------
fhahn wrote:
We either must have a single user that is Build(Struct)Vector, or the phi has only its first lane used. Added an assert in the else() case
https://github.com/llvm/llvm-project/pull/189022
More information about the llvm-commits
mailing list