[llvm] [CoroSplit] Fix infinite loop in CoroSplit (PR #185599)

Chuanqi Xu via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 11 01:36:21 PDT 2026


================
@@ -818,8 +818,9 @@ static void updateScopeLine(Instruction *ActiveSuspend,
   BasicBlock::iterator Successor = ActiveSuspend->getNextNode()->getIterator();
   // Corosplit splits the BB around ActiveSuspend, so the meaningful
   // instructions are not in the same BB.
-  while (auto *Branch = dyn_cast_or_null<BranchInst>(Successor)) {
-    if (!Branch->isUnconditional())
+  for (unsigned Repeat = 0; Repeat < 2; Repeat++) {
----------------
ChuanqiXu9 wrote:

Why did we change this? I feel the version I saw yesterday was better.

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


More information about the llvm-commits mailing list