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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-07-08

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, the loads should be all aligned ... but maybe we're not figuring they are.
Ah, so this is confusion in vect_compute_data_ref_alignment which does

  /* If this is a backward running DR then first access in the larger
     vectype actually is N-1 elements before the address in the DR.
     Adjust misalign accordingly.  */
  if (tree_int_cst_sgn (drb->step) < 0)
    /* PLUS because STEP is negative.  */
    misalignment += ((TYPE_VECTOR_SUBPARTS (vectype) - 1)
                     * -TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE
(vectype))));

but that's of course not the ideal place to do this because the actual
DRs alignment is _not_ different.  And in fact for SLP the above is even
bogus - I suppose we might even end up with wrong code in case the above
would make the access appear aligned.

Reply via email to