public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR44838
@ 2010-07-08  9:07 Richard Guenther
  0 siblings, 0 replies; only message in thread
From: Richard Guenther @ 2010-07-08  9:07 UTC (permalink / raw)
  To: gcc-patches


This fixes PR44838, a case that exposes that using SSA name equivalence
to derive value equivalence isn't valid in RTL.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2010-07-08  Richard Guenther  <rguenther@suse.de>

	PR rtl-optimization/44838
	* tree-ssa-alias.c (indirect_refs_may_alias_p): When not in
	SSA form do not use pointer equivalence.

Index: gcc/tree-ssa-alias.c
===================================================================
*** gcc/tree-ssa-alias.c	(revision 161913)
--- gcc/tree-ssa-alias.c	(working copy)
*************** indirect_refs_may_alias_p (tree ref1 ATT
*** 801,807 ****
    /* If both bases are based on pointers they cannot alias if they may not
       point to the same memory object or if they point to the same object
       and the accesses do not overlap.  */
!   if (operand_equal_p (ptr1, ptr2, 0))
      {
        if (TREE_CODE (base1) == MEM_REF)
  	offset1 += mem_ref_offset (base1).low * BITS_PER_UNIT;
--- 801,808 ----
    /* If both bases are based on pointers they cannot alias if they may not
       point to the same memory object or if they point to the same object
       and the accesses do not overlap.  */
!   if ((!cfun || gimple_in_ssa_p (cfun))
!       && operand_equal_p (ptr1, ptr2, 0))
      {
        if (TREE_CODE (base1) == MEM_REF)
  	offset1 += mem_ref_offset (base1).low * BITS_PER_UNIT;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-08  9:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-08  9:07 [PATCH] Fix PR44838 Richard Guenther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).