This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Optimize manual byte swap implementations using the GCC bswap builtin


Andreas Krebbel wrote:

> with the attached patch GCC detects manual byte swap implementations
> and emits a call to the bswap builtins instead. It is implemented as a
> tree-level pass in tree-ssa-math-opts.c.
> 
> The testcase includes the most prominent byte swap implementation for
> 32 and 64 bit copied from the Linux kernel.
> 
> I've bootstrapped the patch on x86_64, s390 and s390x.
> The included testcase succeeds on these 3 targets.
> 
> Ok for mainline when entering stage 1?

Did you check htons() et al?

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]