Re: Add value range support into memcpy/memset expansion

2013-11-19 Thread Jakub Jelinek
On Tue, Nov 19, 2013 at 09:50:56AM +0100, Richard Biener wrote: > > this patch fixes two issues with memcpy testcase - silences warning and > > updates > > the template as suggested by Uros in the PR. The testcase still fails on > > i386. > > This is because we end up with: > > ;; Function t (t,

Re: Add value range support into memcpy/memset expansion

2013-11-19 Thread Richard Biener
On Tue, 19 Nov 2013, Jan Hubicka wrote: > Hi, > this patch fixes two issues with memcpy testcase - silences warning and > updates > the template as suggested by Uros in the PR. The testcase still fails on > i386. > This is because we end up with: > ;; Function t (t, funcdef_no=0, decl_uid=1763,

Re: Add value range support into memcpy/memset expansion

2013-11-18 Thread Jan Hubicka
Hi, this patch fixes two issues with memcpy testcase - silences warning and updates the template as suggested by Uros in the PR. The testcase still fails on i386. This is because we end up with: ;; Function t (t, funcdef_no=0, decl_uid=1763, symbol_order=2) t (unsigned int c) { void * b.0_4;

Re: Add value range support into memcpy/memset expansion

2013-11-18 Thread H.J. Lu
On Mon, Nov 18, 2013 at 9:16 AM, H.J. Lu wrote: > On Mon, Nov 18, 2013 at 6:19 AM, H.J. Lu wrote: >> On Sun, Nov 17, 2013 at 3:38 PM, Jan Hubicka wrote: >>> Hi, >>> this is version I comitted. It also adds a testcase and enables the support >>> in i386 backend. >>> >>> Honza >>> >>> * d

Re: Add value range support into memcpy/memset expansion

2013-11-18 Thread Jan Hubicka
> > I opened: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59175 Thanks, seems I mixed up the testcase file. Will fix that soon. Honza > > -- > H.J.

Re: Add value range support into memcpy/memset expansion

2013-11-18 Thread H.J. Lu
On Mon, Nov 18, 2013 at 6:19 AM, H.J. Lu wrote: > On Sun, Nov 17, 2013 at 3:38 PM, Jan Hubicka wrote: >> Hi, >> this is version I comitted. It also adds a testcase and enables the support >> in i386 backend. >> >> Honza >> >> * doc/md.texi (setmem, movstr): Update documentation. >>

Re: Add value range support into memcpy/memset expansion

2013-11-18 Thread H.J. Lu
On Sun, Nov 17, 2013 at 3:38 PM, Jan Hubicka wrote: > Hi, > this is version I comitted. It also adds a testcase and enables the support > in i386 backend. > > Honza > > * doc/md.texi (setmem, movstr): Update documentation. > * builtins.c (determine_block_size): New function. >

Re: Add value range support into memcpy/memset expansion

2013-11-17 Thread Jan Hubicka
Hi, this is version I comitted. It also adds a testcase and enables the support in i386 backend. Honza * doc/md.texi (setmem, movstr): Update documentation. * builtins.c (determine_block_size): New function. (expand_builtin_memcpy): Use it and pass it to emit_bloc

Re: Add value range support into memcpy/memset expansion

2013-11-15 Thread Richard Biener
On Fri, 15 Nov 2013, Jan Hubicka wrote: > > Hi, > > this patch makes it possible to access value range info from setmem/movstr > > that > > I plan to use in i386 memcpy/memset expansion code. It is all quite > > straighforward except that I need to deal with cases where max size does not > > fit

Re: Add value range support into memcpy/memset expansion

2013-11-15 Thread Jan Hubicka
> Hi, > this patch makes it possible to access value range info from setmem/movstr > that > I plan to use in i386 memcpy/memset expansion code. It is all quite > straighforward except that I need to deal with cases where max size does not > fit in HOST_WIDE_INT where I use maximal value as a mark

Re: Add value range support into memcpy/memset expansion

2013-09-29 Thread Jan Hubicka
> Hi Jan, > > > I also think the misaligned move trick can/should be performed by > > move_by_pieces and we ought to consider sane use of SSE - current > > vector_loop > > with unrolling factor of 4 seems bit extreme. At least buldozer is happy > > with > > 2 and I would expect SSE moves to be

Re: Add value range support into memcpy/memset expansion

2013-09-29 Thread Michael V. Zolotukhin
Hi Jan, > I also think the misaligned move trick can/should be performed by > move_by_pieces and we ought to consider sane use of SSE - current vector_loop > with unrolling factor of 4 seems bit extreme. At least buldozer is happy with > 2 and I would expect SSE moves to be especially useful for

Re: Add value range support into memcpy/memset expansion

2013-09-29 Thread Jan Hubicka
> > We now produce: > > movqb(%rip), %rsi > > movqa(%rip), %rcx > > movq(%rsi), %rax <- first 8 bytes are moved > > leaq8(%rcx), %rdi > > andq$-8, %rdi <- dest is aligned > > movq%rax, (%rcx) > > movq132(%rsi), %r

Re: Add value range support into memcpy/memset expansion

2013-09-28 Thread Xinliang David Li
On Sat, Sep 28, 2013 at 3:05 PM, Jan Hubicka wrote: >> > Nice extension. Test cases would be great to have. >> Fore those you need i386 changes to actually use the info. I will post that >> after some cleanup and additional testing. > > Hi, > since I already caught your attention, here is the tar

Re: Add value range support into memcpy/memset expansion

2013-09-28 Thread Jan Hubicka
> > Nice extension. Test cases would be great to have. > Fore those you need i386 changes to actually use the info. I will post that > after some cleanup and additional testing. Hi, since I already caught your attention, here is the target specific part for comments. this patch implements memcpy

Re: Add value range support into memcpy/memset expansion

2013-09-28 Thread Jan Hubicka
> Nice extension. Test cases would be great to have. Fore those you need i386 changes to actually use the info. I will post that after some cleanup and additional testing. Honza

Re: Add value range support into memcpy/memset expansion

2013-09-27 Thread Xinliang David Li
Nice extension. Test cases would be great to have. thanks, David On Fri, Sep 27, 2013 at 7:50 AM, Jan Hubicka wrote: > Hi, > this patch makes it possible to access value range info from setmem/movstr > that > I plan to use in i386 memcpy/memset expansion code. It is all quite > straighforward