https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95817
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- There isn't really any advantage of either form, both are the same number of instructions, and after all, for higher shift counts the shift is more efficient (we have a combine splitter for that already). So, the only reason for the transformation would be code canonicalization.