https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123149
--- Comment #7 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> (In reply to Andrew Pinski from comment #4)
> > Looks like the subreg is getting in the way to detecting this as a rotate.
>
> But 64 is not recognized either.
> With say
> ```
> __m128i rot1_64(__m128i v) {
> return _mm_xor_si128(_mm_slli_epi64(v, 5), _mm_srli_epi64(v, 64-5));
> }
> ```
> Combine gets:
> ```
> Trying 8, 6 -> 10:
> 8: r106:V2DI=r104:V2DI<<0x5
> REG_DEAD r104:V2DI
> 6: r105:V2DI=r104:V2DI 0>>0x3b
> 10: r108:V2DI=r105:V2DI^r106:V2DI
> REG_DEAD r106:V2DI
> REG_DEAD r105:V2DI
> Failed to match this instruction:
> (set (reg:V2DI 108 [ _3 ])
> (rotate:V2DI (reg/v:V2DI 104 [ v ])
> (const_int 5 [0x5])))
> ```
>
> which is not recognized even though it should be as:
> vprolq $5, %xmm0, %xmm0
My link show combine works for _m128i rot1_64.
https://godbolt.org/z/9Mf14vKco