[llvm] Revert "[BasicBlockUtils] Handle funclets when detaching EH pad blocks" (PR #158364)

Gábor Spaits via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 13 10:20:53 PDT 2025


spaits wrote:

I think I have found the problem:
```ll
bb10:                                             ; preds = %bb9, %bb
  %phi11 = phi ptr [ %arg, %bb9 ], [ null, %bb ]
```
Here `bb9` is ureachable, and my patch replaces the `cleanupret` in it with in it with unreachable.

(If we wouldn't do that, it would crash in some other scenarion: see https://github.com/llvm/llvm-project/issues/148052)

I also see that the problem is that, I don't update the successors of the extra deleted EH related blocks.

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


More information about the llvm-commits mailing list