[PATCH] D62604: [CodeGen] Generic Hardware Loop Support

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 03:02:08 PDT 2019


SjoerdMeijer added a comment.

Went through this for the first time, just some initial nits inline, will continue looking a bit.



================
Comment at: lib/CodeGen/HardwareLoops.cpp:54
+ForceHardwareLoops("force-hardware-loops", cl::Hidden, cl::init(false),
+                   cl::desc("Force hardware loops intrinsics to be inserted"));
+
----------------
Nit: perhaps add something along the lines of "force hwloops even when the cost model does not deem it profitable"?


================
Comment at: lib/CodeGen/HardwareLoops.cpp:180
+    if (!L->getParentLoop())
+      TryConvertLoop(L);
+  }
----------------
Do we want to check the return value?


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:9840
 
-    assert(N->getValueType(0) == MVT::i1 &&
-           "Unexpected result type for CTR decrement intrinsic");
+    //assert(N->getValueType(0) == MVT::i1 &&
+      //     "Unexpected result type for CTR decrement intrinsic");
----------------
Should this be commented out? Remove this?


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

https://reviews.llvm.org/D62604





More information about the llvm-commits mailing list