[llvm] [LoopIdiom] Use HashRecognize to optimize CRC (PR #143208)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 6 11:42:36 PDT 2025


================
@@ -1473,6 +1491,160 @@ bool LoopIdiomRecognize::avoidLIRForMultiBlockLoop(bool IsMemset,
   return false;
 }
 
+bool LoopIdiomRecognize::optimizeCRCLoop(const PolynomialInfo &Info) {
+  // FIXME: Hexagon has a special HexagonLoopIdiom that optimizes CRC using
----------------
artagnon wrote:

I think there is already work in progress to add a TTI hook with the CLMUL intrinsic work (https://github.com/llvm/llvm-project/pull/140301), and @nikic suggested this solution as a stopgap.

https://github.com/llvm/llvm-project/pull/143208


More information about the llvm-commits mailing list