[llvm] [VPlan] Replace PhiR operand of ComputeRdxResult with VPIRFlags. (PR #174026)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 6 14:40:25 PST 2026


================
@@ -7305,8 +7305,20 @@ static void fixReductionScalarResumeWhenVectorizingEpilog(
        EpiRedResult->getOpcode() != VPInstruction::ComputeFindIVResult))
     return;
 
-  auto *EpiRedHeaderPhi =
-      cast<VPReductionPHIRecipe>(EpiRedResult->getOperand(0));
+  VPReductionPHIRecipe *EpiRedHeaderPhi;
+  if (EpiRedResult->getOpcode() == VPInstruction::ComputeReductionResult) {
----------------
fhahn wrote:

Yep, I'll also submit a follow-up PR to also remove the RdxPhi operand for ComputeAnyOfResult.

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


More information about the llvm-commits mailing list