This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: movmem pattern and missed alignment


On Tue, Oct 9, 2018 at 11:23 AM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Tue, Oct 09, 2018 at 11:08:44AM +0200, Richard Biener wrote:
> > On Tue, Oct 9, 2018 at 11:00 AM Alexander Monakov <amonakov@ispras.ru> wrote:
> > >
> > > On Tue, 9 Oct 2018, Richard Biener wrote:
> > > >
> > > > then we cannot set the alignment of i_1 at/after k = *i_1 because doing so would
> > > > affect the alignment test which we'd then optimize away.  We'd need to introduce
> > > > a SSA copy to get a new SSA name but that would be optimized away quickly.
> > >
> > > We preserve __builtin_assume_aligned up to pass-fold-all-builtins, so would it
> > > work to emit it just before the memcpy
> > >
> > >   i_2 = __builtin_assume_aligned(i_1, 4);
> > >   __builtin_memcpy(j, i_2, 32);
> > >
> > > in theory?
> >
> > That's still before RTL expansion so I'm not sure that is enough.
>
> But we likely won't invalidate the computed SSA_NAME_INFO afterwards.

But we've propagated out the i_2 = i_1 copy, no?

Richard.

>         Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]