junbuml added a comment. Note that this change was originally written by @haicheng in https://reviews.llvm.org/D29870 and I updated his change by using a new TTI hook to get the number of case cluster based on https://reviews.llvm.org/D31080. https://reviews.llvm.org/D31085