This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: Add x86 integer intrinsics
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.