[llvm] [AMDGPU] Correctly extract higher 16 bits from sgpr when G_UNMERGE_VALUES is used (PR #188287)

Igor Wodiany via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 25 03:58:04 PDT 2026


IgWod wrote:

> It would be great if MachineVerifier could enforce this.

So, I'm not familiar with MachineVerifier, but I assume it will run in between compilation stages, so in this case after `instruction-select` and before `finalize-isel`. The problem  is that for the given example lo16 and hi16 do not make it past the end of `instruction-select` as they get eliminated by: https://github.com/llvm/llvm-project/blob/17d28a5b53b04c6a89ff3087a3fb57f462e563fa/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp#L237

Maybe we could guard against somewhere in `SIRegisterInfo`, but I would have to look into it more.

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


More information about the llvm-commits mailing list