diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-08-31 23:03:23 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-08-31 23:03:23 +0000 |
commit | 32cf9a0f9a842e9af09f7289f6da1de69d3c5788 (patch) | |
tree | 9f0dbb7e107a5299129bf63d4aca296ff1785347 /gcc/cse.c | |
parent | becc5c4ebfebf0d4a29b19bc71127d84bf9ed915 (diff) | |
download | gcc-32cf9a0f9a842e9af09f7289f6da1de69d3c5788.tar.gz |
(canon_hash, CONST_DOUBLE): Hash integer and real differently.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10303 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/cse.c b/gcc/cse.c index 0b715c86d7b..cba56febbd2 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -1897,11 +1897,15 @@ canon_hash (x, mode) /* This is like the general case, except that it only counts the integers representing the constant. */ hash += (unsigned) code + (unsigned) GET_MODE (x); - for (i = 2; i < GET_RTX_LENGTH (CONST_DOUBLE); i++) - { - unsigned tem = XINT (x, i); - hash += tem; - } + if (GET_MODE (x) != VOIDmode) + for (i = 2; i < GET_RTX_LENGTH (CONST_DOUBLE); i++) + { + unsigned tem = XINT (x, i); + hash += tem; + } + else + hash += ((unsigned) CONST_DOUBLE_LOW (x) + + (unsigned) CONST_DOUBLE_HIGH (x)); return hash; /* Assume there is only one rtx object for any given label. */ |