Jump threading for finite state automata

Hello,

As noted in PR39043, LLVM is unable to optimize a code containing finite state automata implemented using while + switch.

E.g. in popular benchmark Coremark there are various FSMs which LLVM could optimize more. GCC devs implemented this optimization [1].

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54742