This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/40210] gcc byte swap builtins inadequately optimized
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 07 Oct 2011 18:45:57 +0000
- Subject: [Bug tree-optimization/40210] gcc byte swap builtins inadequately optimized
- Auto-submitted: auto-generated
- References: <bug-40210-4@http.gcc.gnu.org/bugzilla/>
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+ :(