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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 12 03:43:25 PDT 2020


fhahn marked 2 inline comments as done.
fhahn 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)))
----------------
gilr wrote:
> 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.
Done! I think it would make sense to move all those checks into a separate function now, that there are multiple users. I'll do that as a follow up.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:724
+  O << " +\n"
+    << Indent << "\"WIDEN-SELECT" << VPlanIngredient(&Ingredient) << "\\l\"";
+}
----------------
gilr wrote:
> Should also print InvariantCond as e.g. in VPWidenGEPRecipe::print()
Done, but I am not sure how to best print it specifically for the condition. I've added a note to the debug output.


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