[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 Apr 7 14:39:50 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:3023
+          Value *EVLPartI32 = Builder.CreateSExtOrTrunc(
+              EVLPart, Type::getInt32Ty(Builder.getContext()));
+          NewSI = Builder.CreateIntrinsic(
----------------
I think you can use Builder.getInt32Ty


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:3065
+        Value *EVLPartI32 = Builder.CreateSExtOrTrunc(
+            EVLPart, Type::getInt32Ty(Builder.getContext()));
+        NewLI = Builder.CreateIntrinsic(
----------------
Same here


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8976
+  if (isa<LoadInst>(Instr) || isa<StoreInst>(Instr)) {
+    if (preferPredicatedWiden()) {
+      return toVPRecipeResult(tryToPredicatedWidenMemory(Instr, Range, Plan));
----------------
Drop curly braces since it's only 1 line


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9017
 
+  if (preferPredicatedWiden()) {
+    return toVPRecipeResult(tryToPredicatedWiden(Instr, Plan));
----------------
Drop curly braces


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9637
+  // FIXME: This is a proof-of-concept naive implementation to demonstrate using
+  // a target dependent intrinisc to compute the vector length.
+  if (TTI->useCustomActiveVectorLengthIntrinsic()) {
----------------
intrinisc -> intrinsic


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