hans added a comment. > When this works for switches it'll be even more powerful. Oh yes. And can it work for function calls too? I.e. transforming if (foo) x = f(1) else x = f(2) to x = f(foo ? 1 : 2); Repository: rL LLVM https://reviews.llvm.org/D22143