[llvm] [VPlan] Introduce ComputeReductionResult VPInstruction opcode. (PR #70253)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 13 03:56:08 PST 2023
================
@@ -9199,6 +9071,14 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
? new VPInstruction(Instruction::Select, {Cond, Red, PhiR}, FMFs)
: new VPInstruction(Instruction::Select, {Cond, Red, PhiR});
Result->insertBefore(&*Builder.getInsertPoint());
+ for (VPUser *U : Red->users()) {
+ auto *UR = cast<VPRecipeBase>(U);
+ if (UR->getParent()->getParent() == PhiR->getParent()->getParent())
+ continue;
+ assert(cast<VPInstruction>(UR)->getOpcode() ==
+ VPInstruction::ComputeReductionResult);
----------------
alexey-bataev wrote:
Add assertion message
https://github.com/llvm/llvm-project/pull/70253
More information about the llvm-commits
mailing list