[PATCH] D149775: [AMDGPU] Reserve SGPR pair when long branches are present
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 27 15:14:12 PDT 2023
arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Target/AMDGPU/GCNPreRALongBranchReg.cpp:116-117
+ constexpr bool ReserveHighestRegister = true;
+ Register LongBranchReservedReg = TRI->findUnusedRegister(
+ MRI, &AMDGPU::SGPR_64RegClass, MF, ReserveHighestRegister);
+ if (!LongBranchReservedReg) {
----------------
crobeck wrote:
> arsenm wrote:
> > I don't see how this can fail unless you're using amdgpu-num-sgprs (and this is one of the reasons it should be removed)
> It failed in some test cases where all the SGPRs were already used from inline asm
oh right
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149775/new/
https://reviews.llvm.org/D149775
More information about the llvm-commits
mailing list