This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: Add x86 integer intrinsics
On Wed, Jun 10, 2009 at 8:38 AM, Paolo Bonzini<firstname.lastname@example.org> wrote:
>> rol(int x, int y)
>> ?return (x << y) | (x >> (32 - y));
> Uhm, because it is not a rotate (the >> shift is arithmetic). ?But this
> ?return ((unsigned)x << y) + ((unsigned)x >> (32-y));
> and the dumps show that it is done before inlining.
> I could not get it to work for rolb/rolw due to int promotion, but I think
> we should treat this as a tree-level missed optimization.
I will update my patch to rewrite 32bit and 64bit rotate/shift.