aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-01-25 15:36:43 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-01-25 15:36:43 +0000
commit8bf43909f8707a06d2ead116bc81f10e5690121e (patch)
tree0100d644cb0b38c8f1d90deece733ef18f3a2a08
parent15071f642a37e072212a6f6bd2906f39750096ab (diff)
downloadgcc-8bf43909f8707a06d2ead116bc81f10e5690121e.zip
gcc-8bf43909f8707a06d2ead116bc81f10e5690121e.tar.gz
gcc-8bf43909f8707a06d2ead116bc81f10e5690121e.tar.bz2
tree-ssa-sccvn.c (vn_reference_eq): Also compare if both bases are dereferenced.
2012-01-25 Richard Guenther <rguenther@suse.de> * tree-ssa-sccvn.c (vn_reference_eq): Also compare if both bases are dereferenced. From-SVN: r183522
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-ssa-sccvn.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f094090..a671f69 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-25 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-sccvn.c (vn_reference_eq): Also compare if both
+ bases are dereferenced.
+
2012-01-25 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/48374
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index ca11ca1..1f03600 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -556,6 +556,7 @@ vn_reference_eq (const void *p1, const void *p2)
tem1.type = TREE_TYPE (tem1.op0);
tem1.opcode = TREE_CODE (tem1.op0);
vro1 = &tem1;
+ deref1 = false;
}
if (deref2 && vro2->opcode == ADDR_EXPR)
{
@@ -564,7 +565,10 @@ vn_reference_eq (const void *p1, const void *p2)
tem2.type = TREE_TYPE (tem2.op0);
tem2.opcode = TREE_CODE (tem2.op0);
vro2 = &tem2;
+ deref2 = false;
}
+ if (deref1 != deref2)
+ return false;
if (!vn_reference_op_eq (vro1, vro2))
return false;
++j;