https://bugs.freedesktop.org/show_bug.cgi?id=97122
--- Comment #7 from Nicolai Hähnle nhaehnle@gmail.com --- I'm sorry, but LLVM 3.7 is extremely old. I'd say you're mostly out of luck.
There have been huge changes to how control flow lowering works, and I'd say trying to cherry-pick individual fixes is basically a hopeless endeavour.