[PATCH] D97278: [VPlan] Support to widen call intructions in VPlan native path

Mauri Mustonen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 3 20:29:46 PST 2021


Kazhuu added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp:75
+        } else if (CallInst *CI = dyn_cast<CallInst>(Inst)) {
+          NewRecipe = new VPWidenCallRecipe(
+              *CI, Plan->mapToVPValues(CI->arg_operands()));
----------------
a.elovikov wrote:
> For my education, how do we know that such wide version is available? What if the vectorization was forced by OMP pragma (so bypass any dependence analysis legality checks), but the function being called is some arbitrary function that doesn't have a wide variant (i.e. not an intrinsic and no OMP's vector variant available)?
> 
> Also, what was the previous behavior? Did we serialize the call?
This is actually a good point. What I've checked the code the inner loop vectorizer use this function `VPRecipeBuilder::tryToWidenCall()` to try to widen the call. I guess something similar should be implemented here instead of trying to widen all calls. But of course avoid code duplication. Now this works because I've been only testing with simple intrinsic calls.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97278



More information about the llvm-commits mailing list