Re: [PATCH 2/2] Only do switch bit test clustering when multiple labels point to same bb

2024-10-17 Thread Filip Kastl
Hi Andi, This seems like a reasonable way to avoid the specific issue in PR117091 and generally speed up switch lowering of switches with all cases unique. I cannot approve this but want to share some comments. On Wed 2024-10-16 17:50:59, Andi Kleen wrote: > diff --git a/gcc/gimple-if-to-switch.

[PATCH 2/2] Only do switch bit test clustering when multiple labels point to same bb

2024-10-16 Thread Andi Kleen
From: Andi Kleen The bit cluster code generation strategy is only beneficial when multiple case labels point to the same code. Do a quick check if that is the case before trying to cluster. This fixes the switch part of PR117091 where all case labels are unique however it doesn't address the per