diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-10 17:57:41 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-10 17:57:41 +0000 |
commit | 589975b54776af56cf7fa896efc0fd9e992d7cbc (patch) | |
tree | 132f1fda22ad4f091c1f4f6778702f52601619d6 /gcc/tree-vn.c | |
parent | 10d0c4c6702e026c1a0f0d9c0438cae32fec1084 (diff) | |
download | gcc-589975b54776af56cf7fa896efc0fd9e992d7cbc.tar.gz |
* tree-vn.c (val_expr_pair_expr_eq): Compare vuses, to match the
hash function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85760 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vn.c')
-rw-r--r-- | gcc/tree-vn.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/tree-vn.c b/gcc/tree-vn.c index b686af296af..061a7ac9104 100644 --- a/gcc/tree-vn.c +++ b/gcc/tree-vn.c @@ -151,11 +151,20 @@ val_expr_pair_expr_eq (const void *p1, const void *p2) { const val_expr_pair_t ve1 = (val_expr_pair_t) p1; const val_expr_pair_t ve2 = (val_expr_pair_t) p2; + size_t i; - if (expressions_equal_p (ve1->e, ve2->e)) - return true; + if (! expressions_equal_p (ve1->e, ve2->e)) + return false; + + if (NUM_VUSES (ve1->vuses) != NUM_VUSES (ve2->vuses)) + return false; - return false; + for (i = 0; i < NUM_VUSES (ve1->vuses); i++) + if (! expressions_equal_p (VUSE_OP (ve1->vuses, i), + VUSE_OP (ve2->vuses, i))) + return false; + + return true; } |