[PATCH] D70240: [ARM][ReachingDefs] Remove dead code in loloops.

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 05:06:24 PST 2019


SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:130
+        return IsDo ? ARM::t2DLS : ARM::t2WLS;
+      else {
+        switch (VCTP->getOpcode()) {
----------------
nit: just a minor simplification, don't need the else, which saves some indentation.


================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:370
+  // we can use this register at InsertPt.
+  if (IsTailPredicationLegal()) {
+    Register NumElements = VCTP->getOperand(0).getReg();
----------------
another nit/simplification: perhaps just return early here with `if (!IsTailPredicationLegal())`


================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:403
+
   LLVM_DEBUG(if (IsTailPredicationLegal()) {
                dbgs() << "ARM Loops: Will use tail predication to convert:\n";
----------------
then we propbably also don't need this `if`.


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

https://reviews.llvm.org/D70240





More information about the llvm-commits mailing list