[llvm] [SimplifyCFG] process prof data when remove case in umin (PR #182261)

Congcong Cai via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 19 05:10:58 PST 2026


================
@@ -7724,7 +7724,7 @@ static bool simplifySwitchWhenUMin(SwitchInst *SI, DomTreeUpdater *DTU) {
     BasicBlock *DeadCaseBB = I->getCaseSuccessor();
     DeadCaseBB->removePredecessor(BB);
     Updates.push_back({DominatorTree::Delete, BB, DeadCaseBB});
-    I = SIW->removeCase(I);
+    I = SIW.removeCase(I);
----------------
HerrCai0907 wrote:

For easier review
```c++
class SwitchInstProfUpdateWrapper {
LLVM_ABI SwitchInst::CaseIt removeCase(SwitchInst::CaseIt I);
SwitchInst *operator->() { return &SI; }
};
```

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


More information about the llvm-commits mailing list