public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/36493]  New: [4.3/4.4 Regression] vectorizer aliasing bug
@ 2008-06-10 20:06 jsm28 at gcc dot gnu dot org
  2008-06-11  8:01 ` [Bug tree-optimization/36493] " irar at il dot ibm dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-06-10 20:06 UTC (permalink / raw)
  To: gcc-bugs

The following code aborts if built for i686-pc-linux-gnu with -msse2 -O3.

extern void abort (void);
int
main (void)
{
  int i;
  long x[12] __attribute__((aligned(16)));
  x[0] = 1;
  for (i = 0; i < 12; i++)
    x[i] = i;
  if (x[0] != 0)
    abort ();
  return 0;
}

The loop gets vectorized using "vector int *" pointers, and then the compiler
decides that "vector int" writes don't conflict with "long" reads.  (If an
array of int is used instead, the test passes.)

(Not x86-specific; originally observed as a failure of
gcc.c-torture/execute/loop-13.c on SPE with an unsubmitted patch to support
autovectorization there.)


-- 
           Summary: [4.3/4.4 Regression] vectorizer aliasing bug
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsm28 at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36493


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

end of thread, other threads:[~2008-12-28  1:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-10 20:06 [Bug tree-optimization/36493] New: [4.3/4.4 Regression] vectorizer aliasing bug jsm28 at gcc dot gnu dot org
2008-06-11  8:01 ` [Bug tree-optimization/36493] " irar at il dot ibm dot com
2008-06-11  8:37 ` rguenth at gcc dot gnu dot org
2008-06-11 11:16 ` jsm28 at gcc dot gnu dot org
2008-06-13 21:45 ` mmitchel at gcc dot gnu dot org
2008-06-16 10:40 ` irar at gcc dot gnu dot org
2008-06-16 10:44 ` irar at gcc dot gnu dot org
2008-06-17 11:50 ` irar at il dot ibm dot com
2008-12-28  1:17 ` pinskia at gcc dot gnu dot 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).