[llvm] [HashRecognize] Clarify hdr comment on GF(2^m) (NFC) (PR #157482)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 8 07:51:24 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-analysis

Author: Ramkumar Ramachandra (artagnon)

<details>
<summary>Changes</summary>

Unify explanation for GF(2^m) and GF(2), which was previously convoluted.

---
Full diff: https://github.com/llvm/llvm-project/pull/157482.diff


1 Files Affected:

- (modified) llvm/lib/Analysis/HashRecognize.cpp (+2-3) 


``````````diff
diff --git a/llvm/lib/Analysis/HashRecognize.cpp b/llvm/lib/Analysis/HashRecognize.cpp
index 5b3448f5df35d..3eb6f0160cdaf 100644
--- a/llvm/lib/Analysis/HashRecognize.cpp
+++ b/llvm/lib/Analysis/HashRecognize.cpp
@@ -24,9 +24,8 @@
 //
 //    c_m * x^m + c_(m-1) * x^(m-1) + ... + c_0 * x^0
 //
-// where each coefficient c is can take values in GF(2^n), where 2^n is termed
-// the order of the Galois field. For GF(2), each coefficient can take values
-// either 0 or 1, and the polynomial is simply represented by m+1 bits,
+// where each coefficient c is can take values 0 or 1, and 2^n is termed the
+// order of the Galois field. The polynomial is simply represented by m+1 bits,
 // corresponding to the coefficients. The different variants of CRC are named by
 // degree of generating polynomial used: so CRC-32 would use a polynomial of
 // degree 32.

``````````

</details>


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


More information about the llvm-commits mailing list