[llvm] [LoopIdiomRecognizer] Implement CRC recognition (PR #79295)

Mikhail Gudim via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 20:19:38 PST 2024


================
@@ -0,0 +1,195 @@
+; RUN: opt -passes=loop-idiom < %s -S -debug -recognize-crc 2>&1 | FileCheck %s
+
+; CRC 8 bit, data 8 bit
+; CHECK: GeneratorPolynomial: 29
+; CHECK: CRC Size: 8
+; CHECK: Reversed: 0
+; CHECK: loop-idiom CRCRegonize: This looks like crc!
+define dso_local zeroext i8 @crc8_loop(ptr noundef %data, i32 noundef %length) {
+entry:
+  br label %for.cond
+
----------------
mgudim wrote:

Please minimize the tests so that they only show the loop involved without all the extra code.

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


More information about the llvm-commits mailing list