[PATCH] D136169: [AMDGPU] Avoid SCC clobbering before S_CSELECT_B32
Alexander via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 19 09:52:46 PDT 2022
alex-t marked 2 inline comments as done.
alex-t added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp:2263
+ Register SCCCopy =
+ RS->scavengeRegister(getBoolRC(), std::prev(P), 0, !UseSGPR);
+ if (!SCCCopy)
----------------
foad wrote:
> None of this code should depend on wave size. You don't want getBoolRC here - that's for VCC which might be a register pair in wave64. You can always save SCC in a single 32-bit SGPR.
Since back SGPR to SCC copy depends on EXEC/EXEC_LO and I am using the same register for saving and restoring I need to use 64bit unless isWave32. I am not sure if I can use S_AND_B32 reg, exec_lo in wave64 mode?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136169/new/
https://reviews.llvm.org/D136169
More information about the llvm-commits
mailing list