[llvm] [LV] Vectorize selecting last IV of min/max element. (PR #141431)
    Alexey Bataev via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jul 21 04:04:49 PDT 2025
    
    
  
================
@@ -7209,7 +7212,11 @@ static void fixReductionScalarResumeWhenVectorizingEpilog(
          ((CmpOp == StartV && isGuaranteedNotToBeUndefOrPoison(CmpOp))));
     assert(IsExpectedPattern && "Unexpected reduction resume pattern");
     MainResumeValue = OrigResumeV;
+  } else {
+    if (auto *VPI = dyn_cast<VPInstruction>(EpiRedHeaderPhi->getStartValue()))
+      MainResumeValue = VPI->getOperand(0)->getUnderlyingValue();
----------------
alexey-bataev wrote:
else if 
https://github.com/llvm/llvm-project/pull/141431
    
    
More information about the llvm-commits
mailing list