joerg added a comment. Can you please also try this on top of the changes from https://reviews.llvm.org/D30333? That's changing one switch transformation to happen much later, making it more sensitive to inline cost estimates. https://reviews.llvm.org/D31085