[llvm] [LoopVectorizer] Add support for partial reductions (PR #92418)
Nicholas Guy via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 06:17:30 PDT 2024
================
@@ -324,26 +324,19 @@ void VPPartialReductionRecipe::execute(VPTransformState &State) {
assert(Opcode == Instruction::Add && "Unhandled partial reduction opcode");
- SmallVector<VPValue *, 2> Operands;
- for (auto *Op : operands())
- Operands.push_back(Op);
+ Value *BinOpVal = State.get(getOperand(0), 0);
----------------
NickGuy-Arm wrote:
Just now catching up on this, thanks @SamTebbs33 for taking ownership of this work in my absence.
I see in https://github.com/llvm/llvm-project/pull/92418/commits/aa8f4c016bbf32a08e45a75181b821ed4ff1dc42 that we ensure that the recipe operands are in this expected order, but what if someone creates a recipe that doesn't adhere to this order.
Can we add some asserts to ensure that the recipe operands are in the expected order?
https://github.com/llvm/llvm-project/pull/92418
More information about the llvm-commits
mailing list