Re: [PATCH] tree-optimization/107767 - not profitable switch conversion

2023-01-11 Thread Martin Liška
On 1/9/23 12:09, Richard Biener wrote: > |Martin, OK with you?| Yes, thanks for handling that. Martin

[PATCH] tree-optimization/107767 - not profitable switch conversion

2023-01-09 Thread Richard Biener via Gcc-patches
When the CFG has not merged equal PHI defs in a switch stmt the cost model from switch conversion gets off and we prefer a jump table over branches. The following fixes that by recording cases that will be merged later and more appropriately counting unique values. Bootstrapped and tested on x86_