[llvm] [AMDGPU] Sink uniform buffer address offsets into soffset (PR #169230)

Prasoon Mishra via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 23 20:55:17 PST 2025


PrasoonMishra wrote:

> Is this pass the right place doing this?

Yes, AMDGPUCodeGenPrepare seems like a better place for this optimization. When I initially attempted it in SelectionDAG’s PreprocessISelDAG, @arsenm and @krzysz00 suggested moving it to the IR level (see PR #160939). This location also makes it easier to implement the next optimization, which promotes the buffer to a scalar when both voffset and soffset are uniform. I plan to add that in a follow-up PR.

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


More information about the llvm-commits mailing list