[llvm] [SCEV] Try to fold ZExt/SExt of AddRec before existing lookup. (PR #208805)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 03:11:49 PDT 2026


https://github.com/fhahn commented:

> I'll flag tentatively that such a widening may not be a good thing on AMDGPU where we have a "uniform 64-bit address + divergent 32-bit offset" addressing mode, so those `zext`s are semantically important. (aka it'd be nice if we know that the index actually has a 32-bit range in a decently durable way)
> 
> But that's a more general issue, and I don't see anything _wrong_ with this change.

Agreed, we already perform this transform, with the patch we trigger in a few more cases; if this transform is not profitable for AMDGPU, that should be addressed separately

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


More information about the llvm-commits mailing list