On Wed, 21 Sep 2016, Doug Gilmore wrote:

> > From: Richard Biener [rguent...@suse.de]
> > Sent: Wednesday, September 21, 2016 12:48 AM
> > To: Doug Gilmore
> > Cc: gcc-patches@gcc.gnu.org; rgue...@gcc.gnu.org
> > Subject: RE: [PATCH] Fix PR tree-optimization/77654
> > 
> > On Tue, 20 Sep 2016, Doug Gilmore wrote:
> > 
> > > It looks like the original message was dropped, resending.
> > >
> > > Doug
> > > ________________________________________
> > > From: Doug Gilmore
> > > Sent: Tuesday, September 20, 2016 2:12 PM
> > > To: gcc-patches@gcc.gnu.org; rgue...@gcc.gnu.org
> > > Subject: [PATCH] Fix PR tree-optimization/77654
> > >
> > > From:
> > >
> > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77654
> > >
> > > Richard Biener wrote:
> > > > Looks good though addr_base should always be a pointer but it might
> > > > not be an SSA name so better check that...
> > >
> > > I took a look at other situations where duplicate_ssa_name_ptr_info()
> > > is called and found that there are no checks for the SSA name since
> > > that check is done in duplicate_ssa_name_ptr_info().  Do you still
> > > want the additional check added?
> > 
> > It checks for !ptr_info but it requires NAME to be an SSA name.
> > 
> > From the attachment in bugzilla (the attachment didn't make it
> > here)
> > 
> > 
> > +
> > +      if (POINTER_TYPE_P (TREE_TYPE (addr_base)))
> > +       {
> > +         duplicate_ssa_name_ptr_info (addr, SSA_NAME_PTR_INFO (addr_base));
> > +         /* As this isn't a plain copy we have to reset alignment
> > +            information.  */
> > +         if (SSA_NAME_PTR_INFO (addr))
> > +           mark_ptr_info_alignment_unknown (SSA_NAME_PTR_INFO (addr));
> > +       }
> > +
> > 
> > I was talking about changing the if to
> > 
> >     if (TREE_CODE (addr_base) == SSA_NAME
> >         && TREE_CODE (addr) == SSA_NAME)
> Sorry I that missed point.  I glossed your comment "addr_base should
> always be a pointer", causing me to go off into the weeds.
> 
> New patch attached.

Ok if successfully bootstrapped / tested.

Thanks,
Richard.

> Thanks,
> 
> Doug
> > 
> > because the addresses could be invariant as far as I can see.
> > 
> > > Also does it make sense to make a test case for this?
> > 
> > I'm not sure how to easily test this.
> > 
> > Richard.
> > 
> > ...
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 
21284 (AG Nuernberg)

Reply via email to