diff options
author | Felix Yang <felix.yang@huawei.com> | 2013-12-30 16:10:14 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2013-12-30 16:10:14 +0000 |
commit | c99ebd4dde82b900c255b594ce5617a52796340b (patch) | |
tree | 8d809e6b32e1386ff80f7c8ddd08ed2892cee022 /gcc | |
parent | 8e72847528aa99b09cfc9b4072dbcf17b6d700bf (diff) | |
download | gcc-c99ebd4dde82b900c255b594ce5617a52796340b.zip gcc-c99ebd4dde82b900c255b594ce5617a52796340b.tar.gz gcc-c99ebd4dde82b900c255b594ce5617a52796340b.tar.bz2 |
ira-costs.c (cost_classes_hasher::equal): Check equality of memcmp and 0 if no difference exists for HV1 and HV2.
2013-12-30 Felix Yang <felix.yang@huawei.com>
* ira-costs.c (cost_classes_hasher::equal): Check equality of
memcmp and 0 if no difference exists for HV1 and HV2.
From-SVN: r206246
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ira-costs.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b0870aa..635704a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-12-30 Felix Yang <felix.yang@huawei.com> + + * ira-costs.c (cost_classes_hasher::equal): Check equality of + memcmp and 0 if no difference exists for HV1 and HV2. + 2013-12-30 Jakub Jelinek <jakub@redhat.com> PR target/59501 diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c index c8d64d5..1d9e1a4 100644 --- a/gcc/ira-costs.c +++ b/gcc/ira-costs.c @@ -154,8 +154,9 @@ cost_classes_hasher::hash (const value_type *hv) inline bool cost_classes_hasher::equal (const value_type *hv1, const compare_type *hv2) { - return hv1->num == hv2->num && memcmp (hv1->classes, hv2->classes, - sizeof (enum reg_class) * hv1->num); + return (hv1->num == hv2->num + && memcmp (hv1->classes, hv2->classes, + sizeof (enum reg_class) * hv1->num) == 0); } /* Delete cost classes info V from the hash table. */ |