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

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 09:02:09 PST 2024


================
@@ -664,6 +678,12 @@ class InnerLoopVectorizer {
   /// for cleaning the checks, if vectorization turns out unprofitable.
   GeneratedRTChecks &RTChecks;
 
+  /// Mapping of induction phis to their bypass values and bypass blocks. They
+  /// need to be added as operands to phi nodes in the scalar loop preheader
+  /// after the epilogue skeleton has been created.
+  DenseMap<PHINode *, std::pair<BasicBlock *, Value *>>
+      Induction2AdditionalBypass;
+
----------------
ayalz wrote:

```suggestion
  /// The additional bypass block which conditionally skips over the epilog loop after executing the main loop. Needed to resume inductions and reductions during epilog vectorization.
  BasicBlock *AdditionalBypassBlock;
  
  /// Mapping of induction phis to their additional bypass values. They
  /// need to be added as operands to phi nodes in the scalar loop preheader
  /// after the epilogue skeleton has been created.
  DenseMap<PHINode *, Value *> Induction2AdditionalBypassValue;

```
?

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


More information about the llvm-commits mailing list