[PATCH] D99750: [LV, VP] RFC: VP intrinsics support for the Loop Vectorizer (Proof-of-Concept)

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 15:06:26 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:1389
+    Constant *WidthArg = State.Builder.getInt64(*State.ElementWidth);
+    Constant *RWFactorArg = State.Builder.getInt64(*State.RegWidthFactor);
+
----------------
ABataev wrote:
> craig.topper wrote:
> > What is RegWidthFactor supposed to represent?
> > 
> > Can we make this the VF instead?
> Generally speaking, LMUL. We can pass VF here, I assume, instead, it should be more portable.
getRegisterBitWidth already has an override in it for LMUL. So I would have add to getRegisterBitWidth in the backend to even figure out what value the factor was applied to. So VF makes more sense.

I think you're now giving llvm.vscale * VF instead of just VF. I need it to be a constant.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99750



More information about the llvm-commits mailing list