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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
We document

class dr_with_seg_len
{  
...
  /* The minimum common alignment of DR's start address, SEG_LEN and
     ACCESS_SIZE.  */
  unsigned int align;

but here we have access_size == 1 and align == 4.  It's also said

  /* All addresses involved are known to have a common alignment ALIGN.
     We can therefore subtract ALIGN from an exclusive endpoint to get
     an inclusive endpoint.  In the best (and common) case, ALIGN is the
     same as the access sizes of both DRs, and so subtracting ALIGN
     cancels out the addition of an access size.  */
  unsigned int align = MIN (dr_a.align, dr_b.align);
  poly_uint64 last_chunk_a = dr_a.access_size - align;
  poly_uint64 last_chunk_b = dr_b.access_size - align;

and

                                                         We also know
     that last_chunk_b <= |step|; this is checked elsewhere if it isn't
     guaranteed at compile time.

step == 4, but last_chunk_a/b are -3U.  I couldn't find the "elsewhere"
to check what we validate there.

I think the case of align > access_size can easily happen with grouped
accesses with a gap at the end (see vect_vfa_access_size), so simply
failing the address-based check for this case is too pessimistic.

Richard, I'd really would like you to handle this.

Reply via email to