[Mlir-commits] [llvm] [mlir] [IR] Split Br into UncondBr and CondBr (PR #184027)

Nikita Popov llvmlistbot at llvm.org
Sun Mar 1 12:17:25 PST 2026


================
@@ -8933,8 +8927,11 @@ bool SimplifyCFGOpt::simplifyOnce(BasicBlock *BB) {
   Instruction *Terminator = BB->getTerminator();
   Builder.SetInsertPoint(Terminator);
   switch (Terminator->getOpcode()) {
-  case Instruction::Br:
-    Changed |= simplifyBranch(cast<BranchInst>(Terminator), Builder);
+  case Instruction::UncondBr:
+    Changed |= simplifyUncondBranch(cast<UncondBrInst>(Terminator), Builder);
----------------
nikic wrote:

Given the `cast`s here, also adjust the type the functions accept?

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


More information about the Mlir-commits mailing list