@mdiluz Amazing. Really, this is perfectly logical if you think about it. It's safe to remove the while loop because it does not have any side effects, and it is also safe to remove the instructions following the while loop because the loop as written provably doesn't terminate.
@aeva @mdiluz but where does the call to unreachable come from? Your logic only explains the loop being optimized out unless I'm missing something.