This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/67601] New: Vectorization of loop causes aligned access to possibly unaligned address


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

            Bug ID: 67601
           Summary: Vectorization of loop causes aligned access to
                    possibly unaligned address
           Product: gcc
           Version: 4.8.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: drohr at jwdt dot org
  Target Milestone: ---

Created attachment 36342
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36342&action=edit
Source code file to reproduce issue

The attached source crashes if compiled with
gcc-4.8.5 -march=native -O2 -ftree-vectorize -o test test.cpp
and it works with
gcc-4.8.5 -march=native -O0 -o test test.cpp

The problem appears with all gcc 4.8.x versions and on all systems I have
tested.
(Gentoo Linux and several RedHat versions, AMD MagnyCours CPU and Intel
Sandy-Bridge CPUs).

When the loop in the SetTracksEnd function is vectorized, the generated code
does not check whether the address is aligned, but it uses movdqa instruction
to load the data.

The problem does not appear in gcc 4.9 and newer, but new versions generate
completely different code, so I am not sure whether this issue has been fixed,
or whether it does no longer pop up by chance.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]