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

            Bug ID: 84921
           Summary: [5 Regression] With -O3 gcc incorrectly assumes
                    aligned SSE instructions (e.g. movdqa) can be used
           Product: gcc
           Version: 5.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jim at meyering dot net
  Target Milestone: ---

Created attachment 43686
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43686&action=edit
5.5 reproducer, with g++ -O3

Much like https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66598, this affects only
the gcc-5-branch (I tested with head of 5) and appears to have been fixed on
trunk by a combination of changes terminating with the 2015-06-18 commit, PR
tree-optimization/66510 (git commit c1bee668987f371617586edafa0dfccf04162a83).

This may also be related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56564,
but someone claimed that was still present in 6.3, which this is not. Bisection
suggests that this was fixed on master before the gcc-6-branch point by the
commit mentioned above.

Running the following minimized reproducer elicits a segfault from 5.5, but not
from 6.1 (6.1 generates a movdqu rather than movdqa):

  g++ -std=c++14 -O3 unaligned-movdqa.cpp && ./a.out

I considered back-porting the above commit and even took a shot at resolving
the four conflicts, but that commit introduces uses of two functions
(vect_slp_analyze_operations and vect_update_vf_for_slp) that were added in
preceding diffs, so did not pursue it.

Reply via email to