https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566
--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> --- I thought we had code to recognize a switch that represents a linear function, I was hoping that it would kick in with your hoisting patch...