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

Piotr Fusik via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 23:27:11 PDT 2025


================
@@ -620,9 +624,10 @@ HashRecognize::recognizeCRC() const {
   if (!checkExtractBits(ResultBits, TC, IsZero, *ByteOrderSwapped))
     return ErrBits(ResultBits, TC, *ByteOrderSwapped);
 
-  const Value *LHSAux = SimpleRecurrence ? SimpleRecurrence.Start : nullptr;
+  Value *LHSAux = SimpleRecurrence ? SimpleRecurrence.Start : nullptr;
+  const CRCTable &SarwateTable = genSarwateTable(GenPoly, *ByteOrderSwapped);
----------------
pfusik wrote:

Ok, I see the reference is now gone.

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


More information about the llvm-commits mailing list