Re: [PATCH-1 v2, rs6000] Replace shift and ior insns with one rotate and mask insn for bswap pattern [PR93453]

2022-06-08 Thread HAO CHEN GUI via Gcc-patches
Hi, On 7/6/2022 下午 11:59, Segher Boessenkool wrote: >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/powerpc/pr93453-1.c >> @@ -0,0 +1,14 @@ >> +/* { dg-do compile { target lp64 } } */ >> +/* { dg-options "-mdejagnu-cpu=power6 -O2" } */ > It doesn't require -m64, only -mpowerpc64. You can use

Re: [PATCH-1 v2, rs6000] Replace shift and ior insns with one rotate and mask insn for bswap pattern [PR93453]

2022-06-07 Thread Segher Boessenkool
On Tue, Jun 07, 2022 at 04:07:58PM +0800, HAO CHEN GUI wrote: > Bootstrapped and tested on ppc64 Linux BE and LE with no regressions. > Is this okay for trunk? Any recommendations? Thanks a lot. One further thing: please make sure you have tested on -m32 as well, especially for integer stuff

Re: [PATCH-1 v2, rs6000] Replace shift and ior insns with one rotate and mask insn for bswap pattern [PR93453]

2022-06-07 Thread Segher Boessenkool
Hi! On Tue, Jun 07, 2022 at 04:07:58PM +0800, HAO CHEN GUI wrote: > This patch replaces shift and ior insns with one rotate and mask > insn for the split patterns which are for DI byte swap on Power6. The > test cases shows the optimization. Nice :-) > - emit_insn (gen_ashldi3 (op3, op3,

[PATCH-1 v2, rs6000] Replace shift and ior insns with one rotate and mask insn for bswap pattern [PR93453]

2022-06-07 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch replaces shift and ior insns with one rotate and mask insn for the split patterns which are for DI byte swap on Power6. The test cases shows the optimization. Bootstrapped and tested on ppc64 Linux BE and LE with no regressions. Is this okay for trunk? Any recommendations?