diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-25 15:36:43 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-25 15:36:43 +0000 |
commit | f9f051a3cfb80007fc08267d6cf76ba58534414a (patch) | |
tree | 0100d644cb0b38c8f1d90deece733ef18f3a2a08 /gcc/tree-ssa-sccvn.c | |
parent | 22bb664ca0021f4e540cdfa56bc1d4238a7c1356 (diff) | |
download | gcc-f9f051a3cfb80007fc08267d6cf76ba58534414a.tar.gz |
2012-01-25 Richard Guenther <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_reference_eq): Also compare if both
bases are dereferenced.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183522 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index ca11ca1cdfc..1f0360011e3 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; |