Fixes #56882. Fixes #60254. When switch has only one successor, it make no sense to thread it. And computing the cost of it brings div-by-zero exception. We prevent it in this patch.