https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109566
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I bet the culprit is that *rotl<mode>3_mask_dot has (<MODE>mode == Pmode || UINTVAL (operands[3]) <= 0x7fffffff) in condition. So, because *branch_anddi3_dot always wants DImode, if Pmode is SImode, it should make sure (UINTVAL (operands[2]) << (63 - nb)) <= 0x7fffffff.