[llvm] [VPlan] Update scalar induction resume values in VPlan. (PR #110577)

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 16:05:14 PST 2024


================
@@ -512,16 +512,17 @@ class InnerLoopVectorizer {
   /// Fix the non-induction PHIs in \p Plan.
   void fixNonInductionPHIs(VPTransformState &State);
 
-  /// Create a new phi node for the induction variable \p OrigPhi to resume
-  /// iteration count in the scalar epilogue, from where the vectorized loop
-  /// left off. \p Step is the SCEV-expanded induction step to use. In cases
-  /// where the loop skeleton is more complicated (i.e., epilogue vectorization)
-  /// and the resume values can come from an additional bypass block, the \p
-  /// AdditionalBypass pair provides information about the bypass block and the
-  /// end value on the edge from bypass to this loop.
-  PHINode *createInductionResumeValue(
+  /// Create a ResumePHI VPInstruction for the induction variable \p OrigPhi to
+  /// resume iteration count in the scalar epilogue, from where the vectorized
+  /// loop left off and add it the scalar preheader of the VPlan. \p Step is the
+  /// SCEV-expanded induction step to use. In cases where the loop skeleton is
+  /// more complicated (i.e., epilogue vectorization) and the resume values can
+  /// come from an additional bypass block, the \p AdditionalBypass pair
+  /// provides information about the bypass block and the end value on the edge
+  /// from bypass to this loop.
----------------
ayalz wrote:

```suggestion
  /// provides this additional bypass block along with the resume value coming
  /// from it.
```

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


More information about the llvm-commits mailing list