[Bug middle-end/95208] missed switch optimization as bit test

2021-12-07 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95208

Martin Liška  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #3 from Martin Liška  ---
Fixed since r11-5049-g5e303cdee1ff01e4.

[Bug middle-end/95208] missed switch optimization as bit test

2021-07-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95208

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

--- Comment #2 from Andrew Pinski  ---
This looks fixed in GCC 11.

[Bug middle-end/95208] missed switch optimization as bit test

2020-05-20 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95208

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2020-05-20
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Looking at the dump files, we select a jump table:

switch (c_2(D))  [67.00%], case 33 ... 35:  [33.00%], case
37 ... 39:  [33.00%], case 42 ... 63:  [33.00%], case 65 ... 91: 
[33.00%], case 93 ... 95:  [33.00%], case 97 ... 126:  [33.00%]>

;; GIMPLE switch case clusters: JT(values:88 comparisons:12 range:94 density:
12.77%):33-126 

We prefer a smaller number of clusters (in this case) one because we don't have
to build a decision tree on top of them. In this case one can't handle all in
of bit test as the range of values is >= 64.