[llvm] [WebAssembly] Handle irreducible EH pad backedges (PR #204631)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 01:31:05 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 cpp -- llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp --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/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp
index b3e98993e..ad26c8d69 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp
@@ -390,9 +390,9 @@ static void redirectSuccessor(MachineBasicBlock *Pred,
 ///
 /// This preserves the machine verifier invariant that exceptional successors
 /// remain direct-to-EHPad while turning the loop body into a single-entry loop.
-static bool cloneEHPadEntriesForBackedges(
-    const BlockSet &Entries, BlockSet &Blocks, MachineFunction &MF,
-    const ReachabilityGraph &Graph) {
+static bool cloneEHPadEntriesForBackedges(const BlockSet &Entries,
+                                          BlockSet &Blocks, MachineFunction &MF,
+                                          const ReachabilityGraph &Graph) {
   const TargetInstrInfo &TII = *MF.getSubtarget().getInstrInfo();
 
   // (1) This EH-specific path is selected only for irreducible SCC entries

``````````

</details>


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


More information about the llvm-commits mailing list