Re: [PATCH] builtin expansion of strncmp for rs6000

2017-01-13 Thread Joseph Myers
On Fri, 13 Jan 2017, Tulio Magno Quites Machado Filho wrote: > > Tulio will look at fixing it in glibc tomorrow. Thanks for the report, > > Does this code affects a specific rs6000 build? i.e. powerpc64le -mcpu=power8. > Or is it generic? build-many-glibcs.py does not use any special configure

Re: [PATCH] builtin expansion of strncmp for rs6000

2017-01-13 Thread Tulio Magno Quites Machado Filho
Segher Boessenkool writes: > On Thu, Jan 12, 2017 at 05:53:06PM +, Joseph Myers wrote: >> On Thu, 15 Dec 2016, Aaron Sawdey wrote: >> >> > + emit_library_call_value (gen_rtx_SYMBOL_REF (Pmode, "strncmp"), >> > + target, LCT_NORMAL,

Re: [PATCH] builtin expansion of strncmp for rs6000

2017-01-12 Thread Segher Boessenkool
On Thu, Jan 12, 2017 at 05:53:06PM +, Joseph Myers wrote: > On Thu, 15 Dec 2016, Aaron Sawdey wrote: > > > + emit_library_call_value (gen_rtx_SYMBOL_REF (Pmode, "strncmp"), > > + target, LCT_NORMAL, GET_MODE (target), 3, > > + force_reg

Re: [PATCH] builtin expansion of strncmp for rs6000

2017-01-12 Thread Joseph Myers
On Thu, 15 Dec 2016, Aaron Sawdey wrote: > + emit_library_call_value (gen_rtx_SYMBOL_REF (Pmode, "strncmp"), > +target, LCT_NORMAL, GET_MODE (target), 3, > +force_reg (Pmode, XEXP (src1, 0)), Pmode, > +

Re: [PATCH] builtin expansion of strncmp for rs6000

2016-12-19 Thread Segher Boessenkool
Hi Aaron, On Mon, Dec 19, 2016 at 09:57:07AM -0600, Aaron Sawdey wrote: > Bootstrap/regtest in progress on ppc64le -mcpu=power8, ok for trunk if > results are clean? > +/* Generate alignment check and branch code to set up for > + strncmp when we don't have DI alignment. > + STRNCMP_LABEL

Re: [PATCH] builtin expansion of strncmp for rs6000

2016-12-19 Thread Aaron Sawdey
On Fri, 2016-12-16 at 17:14 -0600, Segher Boessenkool wrote: > Please repost.  Thanks, Hi Segher, Thanks for the review. Attached is an updated patch that should address the issues you noted. Bootstrap/regtest in progress on ppc64le -mcpu=power8, ok for trunk if results are clean? Thanks,

Re: [PATCH] builtin expansion of strncmp for rs6000

2016-12-16 Thread Segher Boessenkool
Hi Aaron, On Thu, Dec 15, 2016 at 10:31:05AM -0600, Aaron Sawdey wrote: > This patch adds a cmpstrnsi pattern for rs6000 target to provide > builtin expansion of strncmp(). Perf tests on a power8 system show that > it is 3-10x faster than the glibc strncmp on RHEL7 for lengths under 64 > bytes. >

[PATCH] builtin expansion of strncmp for rs6000

2016-12-15 Thread Aaron Sawdey
This patch adds a cmpstrnsi pattern for rs6000 target to provide builtin expansion of strncmp(). Perf tests on a power8 system show that it is 3-10x faster than the glibc strncmp on RHEL7 for lengths under 64 bytes. Bootstrap/regtest has passed on powerpc64le, in progress for powerpc64, ok for