[PATCH] D75533: [ARM][LowOverheadLoops] Handle reductions

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 29 08:36:47 PDT 2020


SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:684
+
+  // TODO: Support more operations that VADD.
+  if (Reduce->getOpcode() != ARM::MVE_VADDi32)
----------------
typo: that


================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:808
   // all the unknown values have to found to be masked by predicated user(s).
+  SmallPtrSet<MachineInstr*, 2> NonPredicated;
   for (auto *MI : reverse(FalseLanesUnknown)) {
----------------
Perhaps it's good to add an comment here or in the description of the algorithm on line 733 - 753 that reductions need special treatment as they define values that are not used by predicated instructions inside the loop.


================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:1336
+
+  for (auto &Reduction : LoLoop.Reductions) {
+    MachineInstr &Copy = Reduction->Copy;
----------------
Do we have a test case with more than 1 reduction?


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

https://reviews.llvm.org/D75533





More information about the llvm-commits mailing list