[llvm] [AMDGPU] Don't merge M0 initializations across calls that clobber M0 (PR #221963)
Pankaj Dwivedi via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 03:58:26 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) ||
----------------
PankajDwivedi-25 wrote:
we need to capture those inst madifying the regmask in clobber?
https://github.com/llvm/llvm-project/pull/221963
More information about the llvm-commits
mailing list