[llvm] [LoopIdiom] Fix a DL-related crash in optimizeCRCLoop (PR #161509)
Piotr Fusik via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 1 05:41:46 PDT 2025
================
@@ -1654,7 +1654,7 @@ bool LoopIdiomRecognize::optimizeCRCLoop(const PolynomialInfo &Info) {
: LoByte(Builder, Indexer, "indexer.lo");
// Always index into a GEP using the index type.
- Indexer = Builder.CreateZExt(
+ Indexer = Builder.CreateZExtOrTrunc(
----------------
pfusik wrote:
Let's just fix the problem that is reported. I would be suprised to see that LLVM targets 8-bit address space.
I now see that `CreateZExt` returns identity if the sizes match. Is the reported case starting with 32-bit indices for a 16-bit address space?
https://github.com/llvm/llvm-project/pull/161509
More information about the llvm-commits
mailing list