https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114490
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Hmm, the backend has: ;; This pattern can't accept a variable shift count, since shifts by ;; zero don't affect the flags. We assume that shifts by constant ;; zero are optimized away.