diff options
author | Richard Guenther <rguenther@suse.de> | 2012-01-25 15:36:43 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-01-25 15:36:43 +0000 |
commit | 8bf43909f8707a06d2ead116bc81f10e5690121e (patch) | |
tree | 0100d644cb0b38c8f1d90deece733ef18f3a2a08 | |
parent | 15071f642a37e072212a6f6bd2906f39750096ab (diff) | |
download | gcc-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/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 4 |
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; |