mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
13b22d3a86
commit
37cf61167f
|
|
@ -1,3 +1,14 @@
|
||||||
|
2005-07-28 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2005-07-29 Joseph S. Myers <joseph@codesourcery.com>
|
2005-07-29 Joseph S. Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
PR c/22240
|
PR c/22240
|
||||||
|
|
|
||||||
|
|
@ -2498,6 +2498,7 @@ exp_equiv_p (rtx x, rtx y, int validate, bool for_gcse)
|
||||||
case PC:
|
case PC:
|
||||||
case CC0:
|
case CC0:
|
||||||
case CONST_INT:
|
case CONST_INT:
|
||||||
|
case CONST_DOUBLE:
|
||||||
return x == y;
|
return x == y;
|
||||||
|
|
||||||
case LABEL_REF:
|
case LABEL_REF:
|
||||||
|
|
|
||||||
15
gcc/cselib.c
15
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))
|
if (GET_CODE (x) != GET_CODE (y) || GET_MODE (x) != GET_MODE (y))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* This won't be handled correctly by the code below. */
|
/* These won't be handled correctly by the code below. */
|
||||||
if (GET_CODE (x) == LABEL_REF)
|
switch (GET_CODE (x))
|
||||||
return XEXP (x, 0) == XEXP (y, 0);
|
{
|
||||||
|
case CONST_DOUBLE:
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case LABEL_REF:
|
||||||
|
return XEXP (x, 0) == XEXP (y, 0);
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
code = GET_CODE (x);
|
code = GET_CODE (x);
|
||||||
fmt = GET_RTX_FORMAT (code);
|
fmt = GET_RTX_FORMAT (code);
|
||||||
|
|
|
||||||
|
|
@ -1879,6 +1879,7 @@ rtx_renumbered_equal_p (rtx x, rtx y)
|
||||||
case ADDR_VEC:
|
case ADDR_VEC:
|
||||||
case ADDR_DIFF_VEC:
|
case ADDR_DIFF_VEC:
|
||||||
case CONST_INT:
|
case CONST_INT:
|
||||||
|
case CONST_DOUBLE:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case LABEL_REF:
|
case LABEL_REF:
|
||||||
|
|
|
||||||
44
gcc/loop.c
44
gcc/loop.c
|
|
@ -2057,14 +2057,26 @@ rtx_equal_for_loop_p (rtx x, rtx y, struct loop_movables *movables,
|
||||||
if (GET_MODE (x) != GET_MODE (y))
|
if (GET_MODE (x) != GET_MODE (y))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* These three types of rtx's can be compared nonrecursively. */
|
/* These types of rtx's can be compared nonrecursively. */
|
||||||
if (code == REG)
|
switch (code)
|
||||||
return (REGNO (x) == REGNO (y) || regs_match_p (x, y, movables));
|
{
|
||||||
|
case PC:
|
||||||
|
case CC0:
|
||||||
|
case CONST_INT:
|
||||||
|
case CONST_DOUBLE:
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (code == LABEL_REF)
|
case REG:
|
||||||
return XEXP (x, 0) == XEXP (y, 0);
|
return (REGNO (x) == REGNO (y) || regs_match_p (x, y, movables));
|
||||||
if (code == SYMBOL_REF)
|
|
||||||
return XSTR (x, 0) == XSTR (y, 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
|
/* Compare the elements. If any pair of corresponding elements
|
||||||
fail to match, return 0 for the whole things. */
|
fail to match, return 0 for the whole things. */
|
||||||
|
|
@ -3984,6 +3996,24 @@ rtx_equal_for_prefetch_p (rtx x, rtx y)
|
||||||
if (code != GET_CODE (y))
|
if (code != GET_CODE (y))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (GET_MODE (x) != GET_MODE (y))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
switch (code)
|
||||||
|
{
|
||||||
|
case PC:
|
||||||
|
case CC0:
|
||||||
|
case CONST_INT:
|
||||||
|
case CONST_DOUBLE:
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case LABEL_REF:
|
||||||
|
return XEXP (x, 0) == XEXP (y, 0);
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (COMMUTATIVE_ARITH_P (x))
|
if (COMMUTATIVE_ARITH_P (x))
|
||||||
{
|
{
|
||||||
return ((rtx_equal_for_prefetch_p (XEXP (x, 0), XEXP (y, 0))
|
return ((rtx_equal_for_prefetch_p (XEXP (x, 0), XEXP (y, 0))
|
||||||
|
|
|
||||||
24
gcc/reload.c
24
gcc/reload.c
|
|
@ -2208,20 +2208,30 @@ operands_match_p (rtx x, rtx y)
|
||||||
|
|
||||||
slow:
|
slow:
|
||||||
|
|
||||||
/* Now we have disposed of all the cases
|
/* Now we have disposed of all the cases in which different rtx codes
|
||||||
in which different rtx codes can match. */
|
can match. */
|
||||||
if (code != GET_CODE (y))
|
if (code != GET_CODE (y))
|
||||||
return 0;
|
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. */
|
/* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent. */
|
||||||
|
|
||||||
if (GET_MODE (x) != GET_MODE (y))
|
if (GET_MODE (x) != GET_MODE (y))
|
||||||
return 0;
|
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
|
/* Compare the elements. If any pair of corresponding elements
|
||||||
fail to match, return 0 for the whole things. */
|
fail to match, return 0 for the whole things. */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue