[llvm] [LoopVectorizer] Add support for partial reductions (PR #92418)
Sam Tebbs via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 07:46:19 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);
----------------
SamTebbs33 wrote:
That's a good idea. I've added an assertion on operand 1 to make sure it's a phi because we're a bit more flexible with what the other operand is.
https://github.com/llvm/llvm-project/pull/92418
More information about the llvm-commits
mailing list