This is the mail archive of the gcc-patches@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: [PATCH] Fix PR 91605


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

  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?

Thanks,
Richard.


> Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
> Is it OK for trunk?
> 
> 
> Thanks
> Bernd.
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 247165 (AG München)

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