[llvm] [VPlan] Add ReductionStartVector VPInstruction. (PR #142290)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 06:21:15 PDT 2025


================
@@ -89,6 +89,8 @@ Type *VPTypeAnalysis::inferScalarTypeForRecipe(const VPInstruction *R) {
                inferScalarType(R->getOperand(1)) &&
            "different types inferred for different operands");
     return IntegerType::get(Ctx, 1);
+  case VPInstruction::ReductionStartVector:
+    return inferScalarType(R->getOperand(0));
----------------
Mel-Chen wrote:

This code matches Instruction::ExtractElement and Instruction::Freeze, maybe we can combine them to avoid duplication?

https://github.com/llvm/llvm-project/pull/142290


More information about the llvm-commits mailing list