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

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 18 14:10:11 PDT 2025


artagnon wrote:

Okay, all the outstanding issues have been resolved. Pending the merge of https://github.com/llvm/llvm-project/pull/144742, and rebase, this PR is ready to review. There could be two sources of miscompiles:

1. CRC is optimized incorrectly, due to the transform's logic. Apart from the casting logic which needs review, the rest should be exactly what's shown in crc_table functions in https://github.com/llvm/llvm-test-suite/pull/258.
2. Incorrect CRC is optimized to correct CRC, due to the analysis being too lax. No fuzzer can help us here, and we just have to wait for reports from developers writing buggy CRCs and seeing it get optimized incorrectly. This should not affect production code, so it's somewhat less severe.

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


More information about the llvm-commits mailing list