https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99396

--- Comment #2 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #1)
>     return std::rotr(v,((unsigned int)t)&63);
> Fixes the problem ....
>     int a = std::abs(t);
>     a &= 63;
>     return std::rotr(v,a);
> 
> Also improves the situtation.
> I am thinking the std::rotr could be rewritten or we could optimize this at
> the tree level into the almost the intrinsics.
> Note I think I Might have gotten the above incorrect a little bit.

I would like to see __builtin_cpp_rotl and __builtin_cpp_rotr to allow more
aggressive optimizations since rotl and rotr are so important for cryptography.

Reply via email to