Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2018-04-09 Thread Jeff Law
On 04/04/2018 06:43 AM, Peter Bergner wrote: > On 4/4/18 4:06 AM, Tamar Christina wrote: >> Now that I know how the loads are done, I have a patch should be both >> correct and generate better code in most cases. >> It just calculates bitsize inside the loop and does the copying in the >>

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2018-04-04 Thread Peter Bergner
On 4/4/18 4:06 AM, Tamar Christina wrote: > Now that I know how the loads are done, I have a patch should be both correct > and generate better code in most cases. > It just calculates bitsize inside the loop and does the copying in the > largest mode possible that's equal or less than the bits

RE: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2018-04-04 Thread Tamar Christina
.org; nd <n...@arm.com>; > l...@redhat.com; i...@airs.com > Subject: Re: [PATCH][GCC][mid-end] Allow larger copies when target > supports unaligned access [Patch (1/2)] > > On Tue, Apr 03, 2018 at 02:30:23PM +0200, Richard Biener wrote: > > On Tue, 3 Apr 2018, Alan Mod

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2018-04-03 Thread Alan Modra
On Tue, Apr 03, 2018 at 02:30:23PM +0200, Richard Biener wrote: > On Tue, 3 Apr 2018, Alan Modra wrote: > > > On Tue, Apr 03, 2018 at 01:01:23PM +0200, Richard Biener wrote: > > > On Fri, 30 Mar 2018, Peter Bergner wrote: > > > > > > > On 3/29/18 9:35 AM, Alan Modra wrote: > > > > > On Thu, Nov

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2018-04-03 Thread Tamar Christina
o...@gmail.com> Sent: Tuesday, April 3, 2018 1:25 PM To: Richard Biener Cc: Peter Bergner; Tamar Christina; gcc-patches@gcc.gnu.org; nd; l...@redhat.com; i...@airs.com Subject: Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)] On Tue, Apr 03, 20

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2018-04-03 Thread Richard Biener
On Tue, 3 Apr 2018, Alan Modra wrote: > On Tue, Apr 03, 2018 at 01:01:23PM +0200, Richard Biener wrote: > > On Fri, 30 Mar 2018, Peter Bergner wrote: > > > > > On 3/29/18 9:35 AM, Alan Modra wrote: > > > > On Thu, Nov 16, 2017 at 03:27:01PM +, Tamar Christina wrote: > > > >> --- a/gcc/expr.c

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2018-04-03 Thread Alan Modra
On Tue, Apr 03, 2018 at 01:01:23PM +0200, Richard Biener wrote: > On Fri, 30 Mar 2018, Peter Bergner wrote: > > > On 3/29/18 9:35 AM, Alan Modra wrote: > > > On Thu, Nov 16, 2017 at 03:27:01PM +, Tamar Christina wrote: > > >> --- a/gcc/expr.c > > >> +++ b/gcc/expr.c > > >> @@ -2769,7 +2769,9

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2018-04-03 Thread Richard Biener
On Fri, 30 Mar 2018, Peter Bergner wrote: > On 3/29/18 9:35 AM, Alan Modra wrote: > > On Thu, Nov 16, 2017 at 03:27:01PM +, Tamar Christina wrote: > >> --- a/gcc/expr.c > >> +++ b/gcc/expr.c > >> @@ -2769,7 +2769,9 @@ copy_blkmode_to_reg (machine_mode mode, tree src) > >> > >>n_regs =

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2018-03-30 Thread Peter Bergner
On 3/29/18 9:35 AM, Alan Modra wrote: > On Thu, Nov 16, 2017 at 03:27:01PM +, Tamar Christina wrote: >> --- a/gcc/expr.c >> +++ b/gcc/expr.c >> @@ -2769,7 +2769,9 @@ copy_blkmode_to_reg (machine_mode mode, tree src) >> >>n_regs = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; >>

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2018-03-30 Thread Peter Bergner
On 3/29/18 9:35 AM, Alan Modra wrote: > On Thu, Nov 16, 2017 at 03:27:01PM +, Tamar Christina wrote: >> --- a/gcc/expr.c >> +++ b/gcc/expr.c >> @@ -2769,7 +2769,9 @@ copy_blkmode_to_reg (machine_mode mode, tree src) >> >>n_regs = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; >>

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2018-03-29 Thread Alan Modra
On Thu, Nov 16, 2017 at 03:27:01PM +, Tamar Christina wrote: > --- a/gcc/expr.c > +++ b/gcc/expr.c > @@ -2769,7 +2769,9 @@ copy_blkmode_to_reg (machine_mode mode, tree src) > >n_regs = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; >dst_words = XALLOCAVEC (rtx, n_regs); > - bitsize

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2017-11-17 Thread Richard Biener
On Thu, 16 Nov 2017, Tamar Christina wrote: > Hi Richard, > > > > > I'd have made it > > > > if { ([is-effective-target non_strict_align] > > && ! ( [istarget ...] || )) > > > > thus default it to 1 for non-strict-align targets. > > > > Fair, I've switched it to a black list

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2017-11-16 Thread Tamar Christina
Hi Richard, > > I'd have made it > > if { ([is-effective-target non_strict_align] > && ! ( [istarget ...] || )) > > thus default it to 1 for non-strict-align targets. > Fair, I've switched it to a black list and have excluded the only one I know should not work. Most of the

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2017-11-16 Thread Richard Biener
On Thu, 16 Nov 2017, Tamar Christina wrote: > > > > > > > > I see. But then the slow_unaligned_access implementation should use > > > > non_strict_align as default somehow as SLOW_UNALIGNED_ACCESS is > > > > defaulted to STRICT_ALIGN. > > > > > > > > Given that SLOW_UNALIGNED_ACCESS has

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2017-11-16 Thread Tamar Christina
> > > > > > I see. But then the slow_unaligned_access implementation should use > > > non_strict_align as default somehow as SLOW_UNALIGNED_ACCESS is > > > defaulted to STRICT_ALIGN. > > > > > > Given that SLOW_UNALIGNED_ACCESS has different values for different > > > modes it would also make

RE: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2017-11-15 Thread Richard Biener
; nd <n...@arm.com>; l...@redhat.com; > > i...@airs.com > > Subject: RE: [PATCH][GCC][mid-end] Allow larger copies when target > > supports unaligned access [Patch (1/2)] > > > > On Wed, 15 Nov 2017, Tamar Christina wrote: > > > > > > >

RE: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2017-11-15 Thread tamar . christina
gt; Sent: Wednesday, November 15, 2017 08:24 > > > To: Tamar Christina <tamar.christ...@arm.com> > > > Cc: gcc-patches@gcc.gnu.org; nd <n...@arm.com>; l...@redhat.com; > > > i...@airs.com > > > Subject: Re: [PATCH][GCC][mid-end] Allow larger copies wh

RE: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2017-11-15 Thread Richard Biener
nu.org; nd <n...@arm.com>; l...@redhat.com; > > i...@airs.com > > Subject: Re: [PATCH][GCC][mid-end] Allow larger copies when target > > supports unaligned access [Patch (1/2)] > > > > On Tue, 14 Nov 2017, Tamar Christina wrote: > > > > > Hi All

RE: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2017-11-15 Thread Tamar Christina
: Re: [PATCH][GCC][mid-end] Allow larger copies when target > supports unaligned access [Patch (1/2)] > > On Tue, 14 Nov 2017, Tamar Christina wrote: > > > Hi All, > > > > This patch allows larger bitsizes to be used as copy size when the > > target does not ha

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2017-11-15 Thread Richard Biener
On Tue, 14 Nov 2017, Tamar Christina wrote: > Hi All, > > This patch allows larger bitsizes to be used as copy size > when the target does not have SLOW_UNALIGNED_ACCESS. > > fun3: > adrpx2, .LANCHOR0 > add x2, x2, :lo12:.LANCHOR0 > mov x0, 0 > sub sp,