https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94779
--- Comment #16 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #15) > (In reply to Martin Liška from comment #14) > > Ok, I've just taken look at what EVRP pass does before SWITCHCONV pass is > > called. > > I see that EVRP can properly prune dead cases of a switch, but it's not > > perfect: > > > > int f1(unsigned x) > > { > > if (x == 2 || x == 3 || x >= 5) > > __builtin_unreachable (); > > switch (x) > > { > > case 0: return 1; > > case 1: return 2; > > case 2: return 3; > > case 3 ... 8: return 4; > > } > > } > > The old VRP/EVRP only tracks simple ranges and anti-ranges, so can't deal > with > what you have above, the new ranger code can deal with multiple subranges, > but the question is if all the interfaces deal with those. EVRP knows the proper range: 2->4 (F) x_6(D) : unsigned int [0, 1][4, 4] > > > This seems to me like a strange EVRP transformation :/ > > Why? And, the user could have written it that way too. Looking into it.