[PATCH] D137542: [AMDGPU] Use aperture registers instead of S_GETREG
Pierre van Houtryve via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 15 02:59:29 PST 2022
Pierre-vh marked an inline comment as done.
Pierre-vh added a comment.
In D137542#3920654 <https://reviews.llvm.org/D137542#3920654>, @arsenm wrote:
> How have you tested this? OpenCL conformance flat tests with -O0 and -O2 should be good enough
I used https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/tree/develop/tests/ocltst, do you mean I should use https://github.com/KhronosGroup/OpenCL-CTS?
Which test should I run? All of them? I don't see a "flat" category
================
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);
----------------
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.
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