[llvm] [AMDGPU][Codegen] Don't incorrectly shrink `S_LOAD_DWORDX{16,8}_IMM` during remat (PR #225209)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 04:49:03 PDT 2026


arsenm wrote:

> As a sidenote, I find it surprising that the `reMaterialize` override performs these opcode changes silently. From name and documentation I would expect it to create an instruction whose def is in the same register class at least. I especially find it weird that for `S_LOAD_DWORDX{16,8}_IMM` we check for a single user and modify it directly from the hook. To me this feels like this shouldn't be the role of `reMaterialize`. If people agree I can address that in the future.

Yes, I don't think this was implemented the right way and I had a difficult time extending this to other cases 

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


More information about the llvm-commits mailing list