public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/65310] New: vectorizer uses wrong alignment
@ 2015-03-04 11:28 rguenth at gcc dot gnu.org
  2015-03-04 11:28 ` [Bug tree-optimization/65310] " rguenth at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-04 11:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65310

            Bug ID: 65310
           Summary: vectorizer uses wrong alignment
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org

Noticed by Jan Hubicka in PR65270:

Hi,
while looking for a testcase that would trigger with tree-tail-merge (because
gimple-fold seems to also miss MEM_REF merging) I noticed following oddity:

struct a 
{
  int a[100000];
};
typedef struct a b __attribute__ ((aligned (32)));
typedef struct a c __attribute__ ((aligned (8)));
typedef struct a d __attribute__ ((aligned (32)));

__attribute__ ((used))
t(b *a, int aligned, b *d)
{
  int i,v;
        c *ptr = a;
  for (i=0;i<100000;i++)
    {
        ptr->a[i]++;
    }
}
main()
{
}

here the loop gets vectorized with assumed alignmen 32.
Changing declaretion to:
t(c *a, int aligned, b *d)
produces correct 8 byte alignment loop.
Alignment of the type of variable A shall not be used.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-03-11 15:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04 11:28 [Bug tree-optimization/65310] New: vectorizer uses wrong alignment rguenth at gcc dot gnu.org
2015-03-04 11:28 ` [Bug tree-optimization/65310] " rguenth at gcc dot gnu.org
2015-03-05  9:14 ` rguenth at gcc dot gnu.org
2015-03-05  9:15 ` rguenth at gcc dot gnu.org
2015-03-09 21:44 ` pthaugen at gcc dot gnu.org
2015-03-10  8:56 ` rguenther at suse dot de
2015-03-10 15:28 ` pthaugen at gcc dot gnu.org
2015-03-11  8:40 ` rguenther at suse dot de
2015-03-11  9:37 ` rguenth at gcc dot gnu.org
2015-03-11  9:54 ` rguenth at gcc dot gnu.org
2015-03-11 15:10 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).