[llvm] Update amdgpu_gfx functions to use s0-s3 for inreg SGPR arguments on targets using scratch instructions for stack (PR #78844)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 20 04:18:57 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 58d5a486ec641156dcf420d67e075dc0a766fc5e b13ea613948eb4bd1c52baf552720bfc3cdc2b6b -- llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp llvm/lib/Target/AMDGPU/SIISelLowering.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
index 0cd1d47a9b..292d7ed74d 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
@@ -733,7 +733,7 @@ bool AMDGPUCallLowering::lowerFormalArguments(
   } else {
     if (!Subtarget.enableFlatScratch())
       CCInfo.AllocateReg(Info->getScratchRSrcReg());
-    if(!IsGraphics)
+    if (!IsGraphics)
       TLI.allocateSpecialInputSGPRs(CCInfo, MF, *TRI, *Info);
   }
   // When we tail call, we need to check if the callee's arguments will fit on
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index 38beae95aa..8eb0d05615 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -2992,7 +2992,7 @@ SDValue SITargetLowering::LowerFormalArguments(
   } else {
     if (!Subtarget->enableFlatScratch())
       CCInfo.AllocateReg(Info->getScratchRSrcReg());
-    if(!IsGraphics)
+    if (!IsGraphics)
       allocateSpecialInputSGPRs(CCInfo, MF, *TRI, *Info);
   }
 

``````````

</details>


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


More information about the llvm-commits mailing list