[PATCH] D77869: [VPlan] Introduce VPWidenSelectRecipe (NFC).

Gil Rapaport via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 12 02:39:13 PDT 2020


gilr added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6950
+  auto willWiden = [&](unsigned VF) -> bool {
+    if (!isa<PHINode>(I) && (CM.isScalarAfterVectorization(I, VF) ||
+                             CM.isProfitableToScalarize(I, VF)))
----------------
Can't be a phi at this point (actually this also holds for tryToWiden as all phi's are taken care of by tryToCreateRecipe, but that belongs in a separate patch).


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6950
+  auto willWiden = [&](unsigned VF) -> bool {
+    if (!isa<PHINode>(I) && (CM.isScalarAfterVectorization(I, VF) ||
+                             CM.isProfitableToScalarize(I, VF)))
----------------
gilr wrote:
> Can't be a phi at this point (actually this also holds for tryToWiden as all phi's are taken care of by tryToCreateRecipe, but that belongs in a separate patch).
If statement can fold into the return expression.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:724
+  O << " +\n"
+    << Indent << "\"WIDEN-SELECT" << VPlanIngredient(&Ingredient) << "\\l\"";
+}
----------------
Should also print InvariantCond as e.g. in VPWidenGEPRecipe::print()


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77869





More information about the llvm-commits mailing list