nikic wrote: Just to double check, do you see regressions if you just use the standard isHighCostExpansion() check? And that's why you are trying to use this more conservative profile count based heuristic instead? https://github.com/llvm/llvm-project/pull/74747