diff options
author | Richard Henderson <rth@redhat.com> | 2005-07-28 22:57:44 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-07-28 22:57:44 -0700 |
commit | 37cf61167f3d85b235bec602cef96b6e39764f2c (patch) | |
tree | 87062b85bae892f1fff511f8c85752bd8d18e25d /gcc/reload.c | |
parent | 13b22d3a861a9d82fe3b70e5cb11ca5c2a9d4c98 (diff) | |
download | gcc-37cf61167f3d85b235bec602cef96b6e39764f2c.zip gcc-37cf61167f3d85b235bec602cef96b6e39764f2c.tar.gz gcc-37cf61167f3d85b235bec602cef96b6e39764f2c.tar.bz2 |
cse.c (exp_equiv_p): Special case CONST_DOUBLE.
* 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.
From-SVN: r102548
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index e2d4a8e..378db66 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -2208,20 +2208,30 @@ operands_match_p (rtx x, rtx y) slow: - /* Now we have disposed of all the cases - in which different rtx codes can match. */ + /* Now we have disposed of all the cases in which different rtx codes + can match. */ if (code != GET_CODE (y)) return 0; - if (code == LABEL_REF) - return XEXP (x, 0) == XEXP (y, 0); - if (code == SYMBOL_REF) - return XSTR (x, 0) == XSTR (y, 0); /* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent. */ - if (GET_MODE (x) != GET_MODE (y)) return 0; + switch (code) + { + case CONST_INT: + case CONST_DOUBLE: + return 0; + + case LABEL_REF: + return XEXP (x, 0) == XEXP (y, 0); + case SYMBOL_REF: + return XSTR (x, 0) == XSTR (y, 0); + + default: + break; + } + /* Compare the elements. If any pair of corresponding elements fail to match, return 0 for the whole things. */ |