[Bug tree-optimization/40210] gcc byte swap builtins inadequately optimized

pluto at agmk dot net gcc-bugzilla@gcc.gnu.org
Fri Oct 7 18:46:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40210

--- Comment #11 from Pawel Sikora <pluto at agmk dot net> 2011-10-07 18:45:57 UTC ---
(In reply to comment #10)
> (In reply to comment #9)
> > Created attachment 25442 [details]
> > testcase
> 
> I think those are hard to optimize really since those are inline-asm really. 
> And the unsigned short one gets optimized correctly.

ahhh,
glibc uses a generic i386 implementation (ror+xchg) in <byteorder.h>
while it has an optimized <byteswap.h> for i486+ :(



More information about the Gcc-bugs mailing list