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/79669] New: tree-loop-vectorize generates movdqa for unaligned address


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

            Bug ID: 79669
           Summary: tree-loop-vectorize generates movdqa for unaligned
                    address
           Product: gcc
           Version: 7.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lee.duhem at gmail dot com
  Target Milestone: ---

Created attachment 40810
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40810&action=edit
source file to reproduce the issue

If the attached test program is compiled with -O3 on x86-64 platform, the
program will crash at a movdqa instruction which is trying to access an
unaligned address:

~/works/gcc/build0/./gcc/xgcc -B$HOME/works/gcc/build0/./gcc/ -Wall -g -O3  -c
-o t00.o t00.c

However, if it is compiled with -O3 -fno-tree-loop-vectorize on the same
platform, this program will finish successfully:

~/works/gcc/build0/./gcc/xgcc -B$HOME/works/gcc/build0/./gcc/ -Wall -g -O3
-fno-tree-loop-vectorize   -c -o t00.o t00.c

And the final executable file does not include movdqa instruction at all.

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