[llvm] [VPlan] Introduce ComputeReductionResult VPInstruction opcode. (PR #70253)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 20 12:03:19 PST 2023


================
@@ -10203,8 +10092,9 @@ bool LoopVectorizePass::processLoop(Loop *L) {
           Value *ResumeV = nullptr;
           // TODO: Move setting of resume values to prepareToExecute.
           if (auto *ReductionPhi = dyn_cast<VPReductionPHIRecipe>(&R)) {
-            ResumeV = MainILV.getReductionResumeValue(
-                ReductionPhi->getRecurrenceDescriptor());
+            ResumeV = ReductionResumeValues
+                          .find(&ReductionPhi->getRecurrenceDescriptor())
+                          ->second;
----------------
fhahn wrote:

Find() is needed as `ReductionResumeValues` is `const` unfortunately. 

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


More information about the llvm-commits mailing list