[clang] [llvm] [SimplifyCFG] Hoist common code for switch multi-case destinations (PR #165700)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 30 13:32:35 PDT 2025


================
@@ -1866,10 +1866,18 @@ bool SimplifyCFGOpt::hoistCommonCodeFromSuccessors(Instruction *TI,
   // If either of the blocks has it's address taken, then we can't do this fold,
   // because the code we'd hoist would no longer run when we jump into the block
   // by it's address.
+  SmallVector<BasicBlock *, 4> UniqSuccessors;
----------------
nikic wrote:

```suggestion
  SmallVector<BasicBlock *, 4> UniqueSuccessors;
```

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


More information about the llvm-commits mailing list