[llvm] [SPIR-V] Improve correctness of emitted MIR between passes for branching instructions (PR #106966)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 2 03:15:12 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 0fa78b6c7bd43c2498700a98c47a02cf4fd06388 b4df7434fefb7ef4fa081c5d17f00466359f034c --extensions cpp -- llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp llvm/lib/Target/SPIRV/SPIRVISelLowering.cpp 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 6bf08be6bb..df1b75bc1c 100644
--- a/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
@@ -839,7 +839,7 @@ static void processSwitches(MachineFunction &MF, SPIRVGlobalRegistry *GR,
   // BlockAddress operands were used to keep information between passes,
   // let's undo the "address taken" status to reflect that Succ doesn't
   // actually correspond to an IR-level basic block.
-  for (MachineBasicBlock *Succ: ClearAddressTaken)
+  for (MachineBasicBlock *Succ : ClearAddressTaken)
     Succ->setAddressTakenIRBlock(nullptr);
 }
 

``````````

</details>


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


More information about the llvm-commits mailing list