[llvm] [ValueTracking] Allow tracking values through Integral AddrSpaceCasts (PR #70483)
Jeffrey Byrnes via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 13:43:36 PDT 2024
jrbyrnes wrote:
AFAICT, the only targets which support address spaces are:
1. AVR (function address space)
2. WebAssembly
3. AMDGPU
4. X86
5. NVPTX
- AVR addrspacecasts are noops https://github.com/llvm/llvm-project/blob/26bd3d0f9a5a518de02f4dc1921648cda54a0d4e/llvm/lib/Target/AVR/AVRTargetMachine.h#L51 so this analysis is correct
- WebAssembly address spaces are non-integral https://github.com/llvm/llvm-project/blob/26bd3d0f9a5a518de02f4dc1921648cda54a0d4e/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp#L122 so this isnt relevant
- AMDGPU addrspace semantics https://github.com/llvm/llvm-project/blob/26bd3d0f9a5a518de02f4dc1921648cda54a0d4e/llvm/lib/Target/AMDGPU/SIISelLowering.cpp#L6741 are consistent with this analysis.
- X86 addrspacecast semantics are consisntent with this anlysis
- NVPTX uses specific isntructions for addrspacecasts, but these are consistent with this analysis (thanks @arsenm ).
So, it does seem we are able to legally do this without much effort. After I add some tests for these targets, this will be ready for review again.
https://github.com/llvm/llvm-project/pull/70483
More information about the llvm-commits
mailing list