Re: [SH] PR 53568 - Add support for bswap built-ins

2012-06-14 Thread Richard Guenther
On Thu, Jun 14, 2012 at 4:39 AM, Kaz Kojima wrote: > Oleg Endo wrote: >> The attached patch improves code generated for byte swap expressions >> such as ((x & 0xFF) << 8) | ((x >> 8) & 0xFF). >> It seems that currently the tree optimizers only detect bswap32 and >> bswap64 but not bswap16 pattern

Re: [SH] PR 53568 - Add support for bswap built-ins

2012-06-13 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch improves code generated for byte swap expressions > such as ((x & 0xFF) << 8) | ((x >> 8) & 0xFF). > It seems that currently the tree optimizers only detect bswap32 and > bswap64 but not bswap16 patterns. The patch adds detection for bswap16 > patterns by pla

[SH] PR 53568 - Add support for bswap built-ins

2012-06-13 Thread Oleg Endo
Hello, The attached patch improves code generated for byte swap expressions such as ((x & 0xFF) << 8) | ((x >> 8) & 0xFF). It seems that currently the tree optimizers only detect bswap32 and bswap64 but not bswap16 patterns. The patch adds detection for bswap16 patterns by playing along with the

Re: [SH] PR 53568 - Add support for bswap built-ins

2012-06-13 Thread Kaz Kojima
Oleg Endo wrote: > The attached patch adds support for the bswap32 built-in on SH. > > Tested with > make -k -j8 check RUNTESTFLAGS="--target_board=sh-sim > \{-m2/-ml,-m2/-mb,-m2a/-mb,-m2a-single/-mb,-m4/-ml, > -m4/-mb,-m4-single/-ml,-m4-single/-mb,-m4a-single/-ml, > -m4a-single/-mb}" > > and n

[SH] PR 53568 - Add support for bswap built-ins

2012-06-13 Thread Oleg Endo
Hello, The attached patch adds support for the bswap32 built-in on SH. Tested with make -k -j8 check RUNTESTFLAGS="--target_board=sh-sim \{-m2/-ml,-m2/-mb,-m2a/-mb,-m2a-single/-mb,-m4/-ml, -m4/-mb,-m4-single/-ml,-m4-single/-mb,-m4a-single/-ml, -m4a-single/-mb}" and no new failures. Cheers, Ol