Switch lowering: Fix broken 'Figure out which block is next' code

This doesn't seem to have worked in a long time, but other optimizations
would clean it up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222961 91177308-0d34-0410-b5e6-96231b3b80d8
Switch lowering: reformat some for loops etc. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222962 91177308-0d34-0410-b5e6-96231b3b80d8