Even a simple program like:

for(i=0;i<1000;i++)
a[i]= b[i]+c[i];

is vectorized using -ftree-vectorize -msse2 -O2 flag. Unaligned instruction are
generated. For any program, Not even a single aligned instruction is generated.

As, the variable STACK_BOUNDARY in function "vect_can_force_dr_alignment_p" in
file tree-vectorizer.c:1798 is defined to be BITS_PER_WORD(32) for i386 in
i386.h . while this should be 128, so this variable should be replaced by some
other variable or might be again restored to PREFERRED_STACK_BOUNDARY, like
previous versions.

In version 4.4.0 , it is replaced by MAX_STACK_ALIGNMENT, which is defined as
MAX_OFILE_ALIGNEMENT in i386.h. So, both conditions return ,the same answer (
alignment <= MAX_OFILE_ALIGNMENT).


-- 
           Summary: no aligned instruction generated for i386
           Product: gcc
           Version: 4.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: abhishek dot shrivastav24 at gmail dot com
 GCC build triplet: i686-unknown-linux
  GCC host triplet: i686-unknown-linux
GCC target triplet: i686-unknown-linux


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

Reply via email to