[PATCH] D70865: [LV] VPValues for memory operation pointers (NFCI)

Gil Rapaport via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 12:25:42 PST 2019


gilr marked 2 inline comments as done.
gilr added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:487
   /// operations if \p BlockInMask is non-null.
-  void vectorizeMemoryInstruction(Instruction *Instr,
-                                  VectorParts *BlockInMask = nullptr);
+  void vectorizeMemoryInstruction(Instruction *Instr, VPTransformState &State,
+                                  VPValue *Addr,
----------------
rengolin wrote:
> nit: keep the same formatting as above (or vice versa)
Not sure I follow ... both vectorizeInterleaveGroup and vectorizeMemoryInstruction were formatted by clang-format.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:2201
 
-  bool InBounds = false;
-  if (auto *gep = dyn_cast<GetElementPtrInst>(Ptr->stripPointerCasts()))
-    InBounds = gep->isInBounds();
-
   for (unsigned Part = 0; Part < UF; Part++) {
+    Value *NewPtr = State.get(Addr, {Part, 0});
----------------
rengolin wrote:
> What's the difference between UF and State.UF? This looks confusing now.
Right. Will switch to LV's UF for consistency.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70865





More information about the llvm-commits mailing list