[llvm] [LV] Vectorize selecting last IV of min/max element. (PR #141431)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 19 07:11:04 PST 2025


================
@@ -7248,7 +7256,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();
----------------
fhahn wrote:

This was left-over and is no longer needed, removed, thanks

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


More information about the llvm-commits mailing list