[llvm] [SPIR-V] Validate and fix bit width of scalar registers (PR #95147)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 10:08:02 PDT 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 2ca8c856eeae739ec1e7242ee7e69f99ecf376d3 d8e17b64ecf0dad9ba7dcd6174e0eae9ada3c1eb -- llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp b/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
index aaba6e873e..53e0432192 100644
--- a/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
@@ -422,7 +422,7 @@ generateAssignInstrs(MachineFunction &MF, SPIRVGlobalRegistry *GR,
       unsigned MIOp = MI.getOpcode();
 
       // validate bit width of scalar registers
-      for (const auto& MOP : MI.operands())
+      for (const auto &MOP : MI.operands())
         if (MOP.isReg())
           widenScalarLLTNextPow2(MOP.getReg(), MRI);
 

``````````

</details>


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


More information about the llvm-commits mailing list