On Mon, 2 Sep 2019, Bernd Edlinger wrote: > On 9/2/19 9:50 AM, Richard Biener wrote: > > On Sun, 1 Sep 2019, Bernd Edlinger wrote: > > > >> Hi, > >> > >> this fixes an oversight in r274986. > >> We need to avoid using movmisalign on DECL_P which are not in memory, > >> similar to the !mem_ref_refers_to_non_mem_p which unfortunately can't > >> handle DECL_P. > >> > > > > But > > > > - && (DECL_P (to) || !mem_ref_refers_to_non_mem_p (to)) > > + && (DECL_P (to) ? MEM_P (DECL_RTL (to)) > > + : !mem_ref_refers_to_non_mem_p (to)) > > > > and in mem_ref_refers_to_non_mem_p we do > > > > if (!DECL_RTL_SET_P (base)) > > return nortl; > > > > return (!MEM_P (DECL_RTL (base))); > > > > so when !DECL_RTL_SET_P (t) we can go full speed ahead? That said, > > can we refactor addr_expr_of_non_mem_decl_p_1 to put > > > > Ah, I was not aware that DECL_RTL has a side-effect if !DECL_RTL_SET_P. > > > > if (TREE_CODE (addr) != ADDR_EXPR) > > return false; > > > > tree base = TREE_OPERAND (addr, 0); > > > > into the single caller and re-use it then also for the DECL_P case? > > > > Yes, that is probably better then. > > So how about this? > Is it OK?
OK. Thanks, Richard.