[clang] [llvm] [AMDGPU] Add an async barrier arrival workaround (PR #238539)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 7 05:54:39 PST 2026


================
@@ -1859,7 +1859,20 @@ void SIFrameLowering::determinePrologEpilogSGPRSaves(
       // If found any unused scratch SGPR, reserve the register itself for Exec
       // copy and there is no need for any spills in that case.
       MFI->setSGPRForEXECCopy(UnusedScratchReg);
-      MRI.replaceRegWith(ReservedRegForExecCopy, UnusedScratchReg);
+      // Only rewrite EXEC saves and restores. Other uses, such as inline
----------------
yxsamliu wrote:

Simplified this with `readsRegister` and `modifiesRegister`. It only renames EXEC saves and restores, leaving fixed asm registers alone.

https://github.com/llvm/llvm-project/pull/238539


More information about the cfe-commits mailing list