[PATCH] D93975: [VPlan] Keep start value of VPWidenPHIRecipe as VPValue.

Gil Rapaport via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 11:28:29 PST 2021


gilr added a comment.

I wonder if the code from fixReductions() could be moved (almost as-is) to widenPHIInstruction() as a first step?



================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4593
+      RecurrenceDescriptor RdxDesc = Legal->getReductionVars()[P];
+      RecurKind RK = RdxDesc.getRecurrenceKind();
+      if (RecurrenceDescriptor::isMinMaxRecurrenceKind(RK)) {
----------------
RK seems to be the only use of RdxDesc. Can be extracted in tryToCreateWidenRecipe() and stored as an ingredient in the recipe.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4597
+        if (ScalarPHI) {
+          StartV = Iden = StartV;
+        } else {
----------------
Intentionally assigning StartV to itself? (symmetry with the else clause?)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93975/new/

https://reviews.llvm.org/D93975



More information about the llvm-commits mailing list