[llvm] [LV] Support EVL for partial reduction and VPExpressionRecipe. (PR #205741)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 3 09:23:40 PDT 2026
================
@@ -3594,8 +3614,23 @@ void VPExpressionRecipe::printRecipe(raw_ostream &O, const Twine &Indent,
O << " = ";
auto *Red = cast<VPReductionRecipe>(ExpressionRecipes.back());
unsigned Opcode = RecurrenceDescriptor::getOpcode(Red->getRecurrenceKind());
- VPValue *RdxStart =
- getOperand(getNumOperands() - (Red->isConditional() ? 2 : 1));
+ VPValue *Mask = getOperand(getNumOperands() - 1);
+ VPValue *EVL =
+ isa<VPReductionEVLRecipe>(Red)
+ ? getOperand(getNumOperands() - (Red->isConditional() ? 2 : 1))
+ : nullptr;
+ VPValue *RdxStart = getOperand(
+ getNumOperands() - (Red->isConditional() ? 2 : 1) - (EVL ? 1 : 0));
----------------
Mel-Chen wrote:
Is it possible to use getChainOp() and look up LiveInPlaceholders to find out which operand position RdxStart is?
https://github.com/llvm/llvm-project/pull/205741
More information about the llvm-commits
mailing list