[PATCH] D143762: [AMDGPU] Enable whole wave register copy
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 21 09:34:24 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:8004-8007
+ auto *TRI = MRI.getTargetRegisterInfo();
+ const TargetRegisterClass *RC =
+ Reg.isVirtual() ? MRI.getRegClass(Reg) : TRI->getPhysRegBaseClass(Reg);
+ return SIRegisterInfo::isSGPRClass(RC) ? AMDGPU::COPY : AMDGPU::PRED_COPY;
----------------
Don't need to query TRI, it's already the RI member. You can also just do RI.isSGPRReg.
Also, you're not checking the flags? The point was to check the flags and switch to the WWM copy. You don't care about SGPR or VGPR, you care about WWM VGPR or not
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143762/new/
https://reviews.llvm.org/D143762
More information about the llvm-commits
mailing list