[llvm] [SimplifyCFG] Simplify switch with implicit default (PR #95665)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 09:21:02 PDT 2024
YanWQ-monad wrote:
> Could you put your code in `eliminateDeadSwitchCases`?
`eliminateDeadSwitchCases` currently seems to mark dead default case with `unreachable` instruction, but not replace the default case? Maybe there is one point I forgot to mention: in the real-world Rust code, the default case in this pattern is already an `unreachable` instruction, and I used `@unreachable()` in testcase and the proof just wanted to show that it is indeed unreachable (because `unreachable` instruction gives a stronger assumption in Alive2). So it seems unnecessary to fold `@unreachable()` to `unreachable` instruction.
I'm not sure if I got your point correctly, and please correct me if not. If so, we could go to the next step?
https://github.com/llvm/llvm-project/pull/95665
More information about the llvm-commits
mailing list