[llvm] [LoopIdiom] Use HashRecognize to optimize CRC (PR #143208)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 17 08:16:34 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);
----------------
artagnon wrote:
We compute the i-th element using a runtime-value of i, which would require IRBuilder to emit the instructions: hence, we cannot do this in the analysis.
https://github.com/llvm/llvm-project/pull/143208
More information about the llvm-commits
mailing list