[llvm] [VPlan] Add ComputeAnyOfResult VPInstruction (NFC) (PR #141932)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 05:27:37 PDT 2025


================
@@ -7209,6 +7209,15 @@ static void addRuntimeUnrollDisableMetaData(Loop *L) {
   }
 }
 
+static Value *getStartValueFromReductionResult(VPInstruction *RdxResult) {
+  using namespace VPlanPatternMatch;
+  assert(RdxResult->getOpcode() == VPInstruction::ComputeFindLastIVResult &&
+         "RdxResult must be ComputeFindLastIVResult");
+  VPValue *StartVPV = RdxResult->getOperand(1);
+  match(StartVPV, m_Freeze(m_VPValue(StartVPV)));
+  return StartVPV->getLiveInIRValue();
+}
+
 // If \p R is a ComputeReductionResult when vectorizing the epilog loop,
----------------
fhahn wrote:

updated thanks

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


More information about the llvm-commits mailing list