Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657, take 2)

2018-04-13 Thread Jakub Jelinek
On Fri, Apr 13, 2018 at 12:10:33PM +, Wilco Dijkstra wrote: > > Anyway, here is what I think Richard was asking for, that I'm currently > > bootstrapping/regtesting.  It can be easily combined with Martin's target > > hook if needed, or do it only for > > endp == 1 && target != const0_rtx && CA

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657, take 2)

2018-04-13 Thread H.J. Lu
On Fri, Apr 13, 2018 at 5:10 AM, Wilco Dijkstra wrote: > This patch causes regressions on AArch64 since it now always calls mempcpy > again, so yes either it would need to be done only for tailcalls (which fixes > the > reported regression) or we need Martin's change too so each target can state

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657, take 2)

2018-04-13 Thread Wilco Dijkstra
Jakub Jelinek wrote:  >On Thu, Apr 12, 2018 at 05:29:35PM +, Wilco Dijkstra wrote: >> > Depending on what you mean old, I see e.g. in 2010 power7 mempcpy got >> > added, >> > in 2013 other power versions, in 2016 s390*, etc.  Doing a decent mempcpy >> > isn't hard if you have asm version of m

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657, take 2)

2018-04-13 Thread Richard Biener
On April 13, 2018 12:35:54 AM GMT+02:00, Jakub Jelinek wrote: >On Thu, Apr 12, 2018 at 07:37:22PM +0200, Jakub Jelinek wrote: >> On Thu, Apr 12, 2018 at 05:29:35PM +, Wilco Dijkstra wrote: >> > > Depending on what you mean old, I see e.g. in 2010 power7 mempcpy >got added, >> > > in 2013 other

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657, take 2)

2018-04-12 Thread Jakub Jelinek
On Thu, Apr 12, 2018 at 07:37:22PM +0200, Jakub Jelinek wrote: > On Thu, Apr 12, 2018 at 05:29:35PM +, Wilco Dijkstra wrote: > > > Depending on what you mean old, I see e.g. in 2010 power7 mempcpy got > > > added, > > > in 2013 other power versions, in 2016 s390*, etc.  Doing a decent mempcpy

[PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657, take 2)

2018-04-12 Thread Jakub Jelinek
On Thu, Apr 12, 2018 at 05:29:35PM +, Wilco Dijkstra wrote: > > Depending on what you mean old, I see e.g. in 2010 power7 mempcpy got added, > > in 2013 other power versions, in 2016 s390*, etc.  Doing a decent mempcpy > > isn't hard if you have asm version of memcpy and one spare register. >