From e73cfe5d34490fef3beaf807140e5e56b3952c92 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 8 Jul 2010 09:09:15 +0000 Subject: [PATCH] re PR rtl-optimization/44838 (RTL loop unrolling causes FAIL: gcc.dg/pr39794.c) 2010-07-08 Richard Guenther PR rtl-optimization/44838 * tree-ssa-alias.c (indirect_refs_may_alias_p): When not in SSA form do not use pointer equivalence. From-SVN: r161945 --- gcc/ChangeLog | 6 ++++++ gcc/tree-ssa-alias.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e374743e854..3d619ad2abf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-07-08 Richard Guenther + + PR rtl-optimization/44838 + * tree-ssa-alias.c (indirect_refs_may_alias_p): When not in + SSA form do not use pointer equivalence. + 2010-07-08 Eric Botcazou * dwarf2out.c (AT_linkage_name): Delete. diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 78eb362ca5c..24608048458 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -801,7 +801,8 @@ indirect_refs_may_alias_p (tree ref1 ATTRIBUTE_UNUSED, tree base1, /* 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 ((!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; -- 2.30.2