[llvm] [AMDGPU] Emit format opcodes for i8 buffer.{load, store}.format in SDAG (PR #209703)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 02:06:56 PDT 2026


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 origin/main HEAD --extensions h,cpp -- llvm/lib/Target/AMDGPU/SIISelLowering.cpp llvm/lib/Target/AMDGPU/SIISelLowering.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index 38acddfd7..9d1043f93 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -13018,12 +13018,9 @@ SDValue SITargetLowering::lowerPointerAsRsrcIntrin(SDNode *Op,
 }
 
 // Handle 8 bit and 16 bit buffer loads
-SDValue SITargetLowering::handleByteShortBufferLoads(SelectionDAG &DAG,
-                                                     EVT LoadVT, SDLoc DL,
-                                                     ArrayRef<SDValue> Ops,
-                                                     MachineMemOperand *MMO,
-                                                     bool IsTFE,
-                                                     bool IsFormat) const {
+SDValue SITargetLowering::handleByteShortBufferLoads(
+    SelectionDAG &DAG, EVT LoadVT, SDLoc DL, ArrayRef<SDValue> Ops,
+    MachineMemOperand *MMO, bool IsTFE, bool IsFormat) const {
   EVT IntVT = LoadVT.changeTypeToInteger();
 
   if (IsTFE) {
@@ -13069,7 +13066,7 @@ SDValue SITargetLowering::handleByteShortBufferStores(SelectionDAG &DAG,
 
   SDValue BufferStoreExt = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i32, Ops[1]);
   Ops[1] = BufferStoreExt;
-  unsigned Opc = IsFormat ? AMDGPUISD::BUFFER_STORE_FORMAT
+  unsigned Opc = IsFormat                 ? AMDGPUISD::BUFFER_STORE_FORMAT
                  : (VDataType == MVT::i8) ? AMDGPUISD::BUFFER_STORE_BYTE
                                           : AMDGPUISD::BUFFER_STORE_SHORT;
   ArrayRef<SDValue> OpsRef = ArrayRef(&Ops[0], 9);

``````````

</details>


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


More information about the llvm-commits mailing list