Re: vector alignment

2019-04-17 Thread Joseph Myers
On Wed, 3 Apr 2019, Richard Biener wrote: > > 1) Is there some reason to align vectors on the same boundary > > as their size no matter how big it is? I can't find such > > a requirement in the ABIs I looked at. Or would it be more > > appropriate to align the big ones on the preferr

Re: vector alignment

2019-04-04 Thread Martin Sebor
On 4/3/19 11:40 PM, Richard Biener wrote: On April 3, 2019 7:59:47 PM GMT+02:00, Martin Sebor wrote: On 4/3/19 5:13 AM, Richard Biener wrote: On Tue, Apr 2, 2019 at 6:20 PM Martin Sebor wrote: GCC tries to align a vector on its natural boundary, i.e., that given by its size, up to MAX_OBJEC

Re: vector alignment

2019-04-03 Thread Richard Biener
On April 3, 2019 7:59:47 PM GMT+02:00, Martin Sebor wrote: >On 4/3/19 5:13 AM, Richard Biener wrote: >> On Tue, Apr 2, 2019 at 6:20 PM Martin Sebor wrote: >>> >>> GCC tries to align a vector on its natural boundary, i.e., that >>> given by its size, up to MAX_OBJECT_ALIGNMENT. Vectors that are >

Re: vector alignment

2019-04-03 Thread Martin Sebor
On 4/3/19 5:13 AM, Richard Biener wrote: On Tue, Apr 2, 2019 at 6:20 PM Martin Sebor wrote: GCC tries to align a vector on its natural boundary, i.e., that given by its size, up to MAX_OBJECT_ALIGNMENT. Vectors that are bigger than that are either silently [mis]aligned on that same maximum bo

Re: vector alignment

2019-04-03 Thread Richard Biener
On Tue, Apr 2, 2019 at 6:20 PM Martin Sebor wrote: > > GCC tries to align a vector on its natural boundary, i.e., that > given by its size, up to MAX_OBJECT_ALIGNMENT. Vectors that are > bigger than that are either silently [mis]aligned on that same > maximum boundary (PR 89798), silently truncat

Re: Vector alignment tracking

2011-10-14 Thread Richard Guenther
On Thu, Oct 13, 2011 at 6:57 PM, Andi Kleen wrote: >> Or I am missing someting? > > I often see the x86 vectorizer with -mtune=generic generate a lot of > complicated code just to adjust for potential misalignment. > > My thought was just if the alias oracle knows what the original > declaration i

Re: Vector alignment tracking

2011-10-13 Thread Jakub Jelinek
On Thu, Oct 13, 2011 at 06:57:47PM +0200, Andi Kleen wrote: > > Or I am missing someting? > > I often see the x86 vectorizer with -mtune=generic generate a lot of > complicated code just to adjust for potential misalignment. > > My thought was just if the alias oracle knows what the original > de

Re: Vector alignment tracking

2011-10-13 Thread Andi Kleen
> Or I am missing someting? I often see the x86 vectorizer with -mtune=generic generate a lot of complicated code just to adjust for potential misalignment. My thought was just if the alias oracle knows what the original declaration is, and it's available for changes (e.g. LTO), it would be like

Re: Vector alignment tracking

2011-10-13 Thread Artem Shinkarov
On Thu, Oct 13, 2011 at 4:54 PM, Andi Kleen wrote: > Artem Shinkarov writes: >> >> 1) Currently in C we cannot provide information that an array is >> aligned to a certain number.  The problem is hidden in the fact, that > > Have you considered doing it the other way round: when an optimization >

Re: Vector alignment tracking

2011-10-13 Thread Andi Kleen
Artem Shinkarov writes: > > 1) Currently in C we cannot provide information that an array is > aligned to a certain number. The problem is hidden in the fact, that Have you considered doing it the other way round: when an optimization needs something to be aligned, make the declaration aligned?

Re: vector alignment question

2005-06-08 Thread Steve Ellcey
> On Wed, Jun 08, 2005 at 12:50:32PM -0700, Steve Ellcey wrote: > > I noticed that vectors are always aligned based on their size, i.e. an > > 8 byte vector has an aligment of 8 bytes, 16 byte vectors an alignment > > of 16, a 256 byte vector an alignment of 256, etc. > > > > Is this really inten

Re: vector alignment question

2005-06-08 Thread Richard Henderson
On Wed, Jun 08, 2005 at 12:50:32PM -0700, Steve Ellcey wrote: > I noticed that vectors are always aligned based on their size, i.e. an > 8 byte vector has an aligment of 8 bytes, 16 byte vectors an alignment > of 16, a 256 byte vector an alignment of 256, etc. > > Is this really intended? Yes.