[PATCH] D79859: [ARM][MVE] Add support for incrementing scatters

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 14 05:20:29 PDT 2020


dmgreen added a comment.

Nice one. Couple of nitpicks or questions.



================
Comment at: llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp:525
+      dbgs()
+      << "masked gathers: loading from vector of pointers with writeback\n");
+  if (Ty->getNumElements() != 4 || Ty->getScalarSizeInBits() != 32)
----------------
gathers ->scatters, loading -> storing.


================
Comment at: llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp:608
+  else
+    Ty = dyn_cast<VectorType>(I->getArgOperand(0)->getType());
   // Incrementing gathers only exist for v4i32
----------------
Does this need to be a dyn_cast? Can it ever not be a vector?


================
Comment at: llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp:731
 
-  // Build the incrementing gather
-  Value *Load = tryCreateMaskedGatherBaseWB(I, Phi, Builder, Immediate);
-
-  // One value to be handed to whoever uses the gather, one is the loop
-  // increment
-  Value *ExtractedLoad = Builder.CreateExtractValue(Load, 0, "Gather");
-  Value *Inc = Builder.CreateExtractValue(Load, 1, "GatherIncrement");
+  Value *Endresult;
+  Value *NewInduction;
----------------
Endresult -> EndResult


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

https://reviews.llvm.org/D79859





More information about the llvm-commits mailing list