[llvm] [VPlan] Consistently use (Part, 0) for first lane scalar values (PR #80271)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 22 05:20:30 PST 2024
================
@@ -1801,7 +1811,10 @@ void VPReductionPHIRecipe::execute(VPTransformState &State) {
for (unsigned Part = 0; Part < LastPartForNewPhi; ++Part) {
Instruction *EntryPart = PHINode::Create(VecTy, 2, "vec.phi");
EntryPart->insertBefore(HeaderBB->getFirstInsertionPt());
- State.set(this, EntryPart, Part);
+ if (IsInLoop)
+ State.set(this, EntryPart, VPIteration(Part, 0));
+ else
+ State.set(this, EntryPart, Part);
----------------
fhahn wrote:
Updated, thanks!
https://github.com/llvm/llvm-project/pull/80271
More information about the llvm-commits
mailing list