[llvm] [InlineCost] Correct the default branch cost for the switch statement (PR #85160)

Quentin Dian via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 07:28:15 PDT 2024


DianQK wrote:

> > But I don't know why it's 4 * InstrCost and not 3 * InstrCost.
> 
> On most targets other than X86 load+jump is 2 instructions.

Thanks. I found that different targets can be quite different in different switch scene. But I think the patch will be at least a little closer now.

https://github.com/llvm/llvm-project/pull/85160


More information about the llvm-commits mailing list