[PATCH] D137542: [AMDGPU] Use aperture registers instead of S_GETREG
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 16 08:56:10 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:1830
+ MRI.setRegClass(Tmp, &AMDGPU::SReg_64_XEXECRegClass);
+ B.buildInstr(AMDGPU::S_MOV_B64).addDef(Tmp).addReg(Register(ApertureRegNo));
+ return B.buildUnmerge(S32, Tmp).getReg(1);
----------------
Pierre-vh wrote:
> arsenm wrote:
> > You can just build a copy at this point. We should use copies and mark it as a constant register
> If I use a COPY it'll think it's okay to eliminate it and use the _HI register directly (which is not supposed to exist but I had to declare it to fix tablegen issues)
> How can I prevent that? I'm not fully satisfied with how things are done in D137767 - I'd really like to eliminate that "HI" register but I'm not sure how.
It's too early to set a register class here. In principle it should work, but it would be better to let the selection constrain the register class normally
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137542/new/
https://reviews.llvm.org/D137542
More information about the llvm-commits
mailing list