Re: [GCC][PATCH][Aarch64] Replace umov with cheaper fmov in popcount expansion

2018-10-29 Thread Richard Henderson
On 10/29/18 10:31 AM, Sam Tebbs wrote: > On 10/23/2018 02:50 PM, Richard Earnshaw (lists) wrote: > >> On 22/10/2018 10:02, Sam Tebbs wrote: >>> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md >>> index >>>

Re: [GCC][PATCH][Aarch64] Replace umov with cheaper fmov in popcount expansion

2018-10-29 Thread Sam Tebbs
On 10/23/2018 02:50 PM, Richard Earnshaw (lists) wrote: > On 22/10/2018 10:02, Sam Tebbs wrote: >> diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md >> index >> d7473418a8eb62b2757017cd1675493f86e41ef4..77e6f75cc15f06733df7b47906ee00580bea8d29 >> 100644 >> ---

Re: [GCC][PATCH][Aarch64] Replace umov with cheaper fmov in popcount expansion

2018-10-23 Thread Richard Earnshaw (lists)
On 22/10/2018 10:02, Sam Tebbs wrote: > Hi all, > > This patch replaces the umov instruction in the aarch64 popcount > expansion with > the less expensive fmov instruction. > > Example: > > int foo (int a) { >   return __builtin_popcount (a); > } > > would generate: > > foo: >   uxtw    x0,

[GCC][PATCH][Aarch64] Replace umov with cheaper fmov in popcount expansion

2018-10-22 Thread Sam Tebbs
Hi all, This patch replaces the umov instruction in the aarch64 popcount expansion with the less expensive fmov instruction. Example: int foo (int a) { return __builtin_popcount (a); } would generate: foo: uxtw x0, w0 fmov d0, x0 cnt v0.8b, v0.8b addv b0, v0.8b umov w0,