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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:dccbf1e2a6e544f71b4a5795f0c79015db019fc3

commit r11-1851-gdccbf1e2a6e544f71b4a5795f0c79015db019fc3
Author: Richard Biener <rguent...@suse.de>
Date:   Mon Jul 6 16:26:50 2020 +0200

    tree-optimization/96075 - fix bogus misalignment calculation

    This fixes bogus misalignment calculation for negative steps
    since an assertion a previous comment indicated no longer holds:

          /* DR_STEP(dr) is the same as -TYPE_SIZE of the scalar type,
             otherwise we wouldn't be here.  */

    Thus the following replaces DR_STEP by -TYPE_SIZE.

    2020-07-06  Richard Biener  <rguent...@suse.de>

            PR tree-optimization/96075
            * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
            TYPE_SIZE_UNIT of the vector component type instead of DR_STEP
            for the misalignment calculation for negative step.

            * gcc.dg/vect/slp-46.c: New testcase.

Reply via email to