This patch actually does a number of related things. I'm happy to split it up if it makes reviewing easier:
- Make SimplifyCFG stop removing unreachable defaults so they can be exploited by other transformations.
- Omit range checks in switch-to-lookup table formation if the default is unreachable. This saves 64 kB off a Clang bootstrap on 64-bit Linux. No effect on Chromium unfortunately.
- Make ConstantFoldTerminator() work when faced with unreachable default.
- Make TurnSwitchRangeIntoICmp() work with unreachable default. This also makes us handle some cases we'd previously get wrong, see the unreachable2 test.
Please take a look!