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

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Tamar Christina from comment #10)
> (In reply to Richard Biener from comment #9)
> > Another bug in the dependence checking code is
> > 
> >                 if (dr_may_alias_p (dr_ref, dr_read, loop_nest))
> > 
> > which will end up using TBAA - dr_may_alias_p doesn't think you are ever
> > going to move stores down across loads.  To verify if that's possible
> > you need to use
> > 
> >                 if (dr_may_alias_p (dr_read, dr_ref, loop_nest))
> > 
> > instead.
> > 
> > Note there's still my very original review consideration that you move
> > stmts out-of-order but the main dependence checking the vectorizer does
> > assumes the stores and loads appear in their original order.  I'm not
> > sure whether with the above we prove this doesn't matter.
> 
> But in the original review I had it that way and you said:
> 
> > +             for (auto dr_read : bases)
> > +               if (dr_may_alias_p (dr_read, dr_ref, loop_nest))
> 
> I think you need to swap dr_read and dr_ref operands, since you
> are walking stmts backwards and thus all reads from 'bases' are
> after the write.
> 
> so I'm somewhat confused..

I was confused.

Reply via email to