[llvm] [AMDGPU][SILoadStoreOptimizer] Try to find common base for L/Ss with 0 offset (PR #71126)
    Jeffrey Byrnes via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Nov  3 16:01:55 PDT 2023
    
    
  
jrbyrnes wrote:
We should also prefer base with offset 0.
For example, if we have
```
    addr1 = &a
    addr2 = &a + 1024
    addr3 = &a + 2048
    addr4 = &a + 3072
```
`promoteConstantOffsetToImm` will choose `addr4` as anchor. However, we can express all the addresses using an anchor of `addr` and that involves no extra computation for producing the base. I'll address this separately though.
https://github.com/llvm/llvm-project/pull/71126
    
    
More information about the llvm-commits
mailing list