From d618034b09e41657a5c4b85f35b11fab3b2d0fc9 Mon Sep 17 00:00:00 2001
From: rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 29 Jul 2005 05:57:44 +0000
Subject:         * cse.c (exp_equiv_p): Special case CONST_DOUBLE.         *
 cselib.c (rtx_equal_for_cselib_p): Likewise.         * jump.c
 (rtx_renumbered_equal_p): Likewise.         * loop.c (rtx_equal_for_loop_p):
 Tidy and special case PC, CC0,         CONST_INT and CONST_DOUBLE.        
 (rtx_equal_for_prefetch_p): Likewise, plus LABEL_REF.         * reload.c
 (operands_match_p): Special case CONST_INT and         CONST_DOUBLE; check
 mode earlier.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102548 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/cselib.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

(limited to 'gcc/cselib.c')

diff --git a/gcc/cselib.c b/gcc/cselib.c
index 5d36be91829..13fc5326dc0 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -462,9 +462,18 @@ rtx_equal_for_cselib_p (rtx x, rtx y)
   if (GET_CODE (x) != GET_CODE (y) || GET_MODE (x) != GET_MODE (y))
     return 0;
 
-  /* This won't be handled correctly by the code below.  */
-  if (GET_CODE (x) == LABEL_REF)
-    return XEXP (x, 0) == XEXP (y, 0);
+  /* These won't be handled correctly by the code below.  */
+  switch (GET_CODE (x))
+    {
+    case CONST_DOUBLE:
+      return 0;
+
+    case LABEL_REF:
+      return XEXP (x, 0) == XEXP (y, 0);
+
+    default:
+      break;
+    }
 
   code = GET_CODE (x);
   fmt = GET_RTX_FORMAT (code);
-- 
cgit v1.2.1