[llvm] [AMDGPU] Compiler should synthesize private buffer resource descriptor from flat_scratch_init (PR #79586)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 04:23:46 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 3a31cf88538ed5282fce5408a48e48265e019ca6 cbecf53314c6d969d6590a62edcf651718a73105 -- llvm/lib/Target/AMDGPU/SIFrameLowering.cpp llvm/lib/Target/AMDGPU/SIFrameLowering.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
index 4842cf83af..63c7c05e68 100644
--- a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
@@ -421,7 +421,8 @@ Register SIFrameLowering::emitEntryFunctionFlatScratchInit(
         break;
       }
     }
-    assert(FlatScratchInitReg && "Failed to find free register for scratch init");
+    assert(FlatScratchInitReg &&
+           "Failed to find free register for scratch init");
 
     FlatScrInitLo = TRI->getSubReg(FlatScratchInitReg, AMDGPU::sub0);
     FlatScrInitHi = TRI->getSubReg(FlatScratchInitReg, AMDGPU::sub1);
@@ -702,7 +703,6 @@ void SIFrameLowering::emitEntryFunctionPrologue(MachineFunction &MF,
     BuildMI(MBB, I, DL, TII->get(AMDGPU::S_MOV_B32), FPReg).addImm(0);
   }
 
-
   if ((NeedsFlatScratchInit || ScratchRsrcReg) &&
       PreloadedScratchWaveOffsetReg && !ST.flatScratchIsArchitected()) {
     MRI.addLiveIn(PreloadedScratchWaveOffsetReg);

``````````

</details>


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


More information about the llvm-commits mailing list