[llvm] [AMDGPU] Don't merge M0 initializations across calls that clobber M0 (PR #221963)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 05:15:22 PDT 2026
================
@@ -609,7 +615,7 @@ static bool hoistAndMergeSGPRInits(unsigned Reg,
const unsigned Threshold = 50;
// Search until B or Threshold for a place to insert the initialization.
for (unsigned I = 0; R != B && I < Threshold; ++R, ++I)
- if (R->readsRegister(Reg, TRI) || R->definesRegister(Reg, TRI) ||
+ if (R->readsRegister(Reg, TRI) || R->modifiesRegister(Reg, TRI) ||
----------------
arsenm wrote:
You should only really need this part?
https://github.com/llvm/llvm-project/pull/221963
More information about the llvm-commits
mailing list