[llvm] [LoopIdiomRecognize] Enable clmul optimization for CRC loops (PR #203405)

Sean Clarke via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 12 12:16:41 PDT 2026


================
@@ -1560,10 +1565,14 @@ bool LoopIdiomRecognize::optimizeCRCLoop(const PolynomialInfo &Info) {
   if (TT.getArch() == Triple::hexagon)
     return false;
 
+  // If using llvm.clmul would be more efficient, use that instead of a lookup
+  // table.
+  if (optimizeCRCLoopWithFastClmul(Info))
+    return true;
----------------
xarkenz wrote:

Fair point, I've changed it to be more like what you suggested.

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


More information about the llvm-commits mailing list