[PATCH] D98549: [AMDGPU] Fix copyPhysReg to not produce unalined vgpr access
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 12 14:17:14 PST 2021
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:879
+ const TargetRegisterClass *SrcRC = RI.getPhysRegClass(SrcReg);
+ if (RC->hasSuperClassEq(RI.getVGPR64Class()) &&
+ !RI.hasAGPRs(SrcRC) &&
----------------
It would be easier to follow if you directly referred to the aligned class. getVGPR64Class will always return that anyway on the targets with the alignment requirement
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:915-918
+ } else if ((Size % 64 == 0) && RI.hasVGPRs(RC) && !RI.hasAGPRs(SrcRC) &&
+ (RC == RI.getVGPRClassForBitWidth(Size) &&
+ (RI.isSGPRClass(SrcRC) ||
+ SrcRC == RI.getVGPRClassForBitWidth(Size)))) {
----------------
This seems more complicated than it needs to be
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98549/new/
https://reviews.llvm.org/D98549
More information about the llvm-commits
mailing list