public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/25413]  New: wrong alignment or incorrect address computation in vectorized code on Pentium 4 SSE
@ 2005-12-14 15:24 David dot Monniaux at ens dot fr
  2005-12-14 15:26 ` [Bug target/25413] " David dot Monniaux at ens dot fr
                   ` (22 more replies)
  0 siblings, 23 replies; 25+ messages in thread
From: David dot Monniaux at ens dot fr @ 2005-12-14 15:24 UTC (permalink / raw)
  To: gcc-bugs

(The same phenomenon happens in 4.2 subversion alpha.)

Incorrect code is generated when using -ftree-vectorize on the SSE2 Pentium 4
target. (The same code works on the AMD64 64-bit target.)

See attached source code.

$ gcc -O2 -Wall -march=pentium4 -mfpmath=sse -ftree-vectorize
-ftree-vectorizer-verbose=1 gcc_plantage2.c -o ./gcc_plantage2
$ ./gcc_plantage2
will segfault (the same program works perfectly without -ftree-vectorize).

The segfault appears at the second movapd instruction:

        movapd  .LC0, %xmm0
.L17:
        movapd  %xmm0, (%eax)
        addl    $1, %edx
        addl    $16, %eax
        cmpl    %edx, %ebx
        ja      .L17

%eax is at this point equal to 4 modulo 16, which results in a segmentation
fault, since movapd assumes 16-byte alignment.


-- 
           Summary: wrong alignment or incorrect address computation in
                    vectorized code on Pentium 4 SSE
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: David dot Monniaux at ens dot fr
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


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


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

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

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-14 15:24 [Bug tree-optimization/25413] New: wrong alignment or incorrect address computation in vectorized code on Pentium 4 SSE David dot Monniaux at ens dot fr
2005-12-14 15:26 ` [Bug target/25413] " David dot Monniaux at ens dot fr
2005-12-15 12:42 ` dorit at il dot ibm dot com
2005-12-15 12:50 ` dorit at il dot ibm dot com
2006-01-30 22:24 ` [Bug tree-optimization/25413] " pinskia at gcc dot gnu dot org
2007-04-02 20:52 ` reichelt at gcc dot gnu dot org
2007-04-03 19:22 ` [Bug target/25413] " dorit at il dot ibm dot com
2007-07-01 10:00 ` dorit at gcc dot gnu dot org
2007-07-02  8:30 ` patchapp at dberlin dot org
2007-07-12 14:42 ` dorit at gcc dot gnu dot org
2007-07-13  0:13 ` dirtyepic at gentoo dot org
2007-07-16  8:02 ` dorit at gcc dot gnu dot org
2007-07-17 11:05 ` reichelt at gcc dot gnu dot org
2007-07-24  9:05 ` dorit at gcc dot gnu dot org
2007-07-24 19:37 ` dirtyepic at gentoo dot org
2007-07-24 19:40 ` dirtyepic at gentoo dot org
2007-07-24 21:21 ` David dot Monniaux at ens dot fr
2007-07-25  8:40 ` dorit at gcc dot gnu dot org
2007-07-25  9:12   ` Andrew Pinski
2007-07-25  8:51 ` dorit at gcc dot gnu dot org
2007-07-25  8:52 ` dorit at gcc dot gnu dot org
2007-07-25  9:12 ` pinskia at gmail dot com
2007-07-25 11:11 ` dorit at gcc dot gnu dot org
2007-07-25 20:24 ` dirtyepic at gentoo dot org
2007-12-28  1:01 ` reichelt 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).