Commit 8beccec8 by Roger Sayle Committed by Roger Sayle

combine.c (combine_simplify_rtx, [...]): Use CC0_P.


	* combine.c (combine_simplify_rtx, simplfy_comparison):  Use CC0_P.
	* cse.c (invalidate_skipped_set):  Likewise.
	* integrate.c (subst_constants):  Likewise.
	* jump.c (reversed_comparison_code_parts):  Likewise.
	* loop.c (canonicalize_condition):  Likewise.
	* simplify-rtx.c (simplify_relational_operation):  Likewise.

From-SVN: r63446
parent b052d8ee
2003-02-25 Roger Sayle <roger@eyesopen.com>
* combine.c (combine_simplify_rtx, simplfy_comparison): Use CC0_P.
* cse.c (invalidate_skipped_set): Likewise.
* integrate.c (subst_constants): Likewise.
* jump.c (reversed_comparison_code_parts): Likewise.
* loop.c (canonicalize_condition): Likewise.
* simplify-rtx.c (simplify_relational_operation): Likewise.
2003-02-25 Roger Sayle <roger@eyesopen.com>
* builtins.def (DEF_LIB_ALWAYS_BUILTIN, DEF_UNUSED_BUILTIN): Delete.
(abs, labs, fabs, fabsf, fabsl, abort, exit, _exit, _Exit): Use
the appropriate macro to define built-in function.
......
......@@ -4494,10 +4494,7 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
with it. */
if (GET_CODE (XEXP (x, 0)) == COMPARE
|| (GET_MODE_CLASS (GET_MODE (XEXP (x, 0))) != MODE_CC
#ifdef HAVE_cc0
&& XEXP (x, 0) != cc0_rtx
#endif
))
&& ! CC0_P (XEXP (x, 0))))
{
rtx op0 = XEXP (x, 0);
rtx op1 = XEXP (x, 1);
......@@ -11010,9 +11007,7 @@ simplify_comparison (code, pop0, pop1)
/* We can't do anything if OP0 is a condition code value, rather
than an actual data value. */
if (const_op != 0
#ifdef HAVE_cc0
|| XEXP (op0, 0) == cc0_rtx
#endif
|| CC0_P (XEXP (op0, 0))
|| GET_MODE_CLASS (GET_MODE (XEXP (op0, 0))) == MODE_CC)
break;
......
......@@ -6658,9 +6658,7 @@ invalidate_skipped_set (dest, set, data)
}
if (GET_CODE (set) == CLOBBER
#ifdef HAVE_cc0
|| dest == cc0_rtx
#endif
|| CC0_P (dest)
|| dest == pc_rtx)
return;
......
/* Procedure integration for GCC.
Copyright (C) 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GCC.
......@@ -2611,10 +2611,7 @@ subst_constants (loc, insn, map, memonly)
{
src = SET_SRC (x);
if (GET_MODE_CLASS (GET_MODE (src)) == MODE_CC
#ifdef HAVE_cc0
|| dest == cc0_rtx
#endif
)
|| CC0_P (dest))
{
compare_mode = GET_MODE (XEXP (src, 0));
if (compare_mode == VOIDmode)
......@@ -2666,9 +2663,7 @@ subst_constants (loc, insn, map, memonly)
|| REGNO (XEXP (src, 0)) == VIRTUAL_STACK_VARS_REGNUM)
&& CONSTANT_P (XEXP (src, 1)))
|| GET_CODE (src) == COMPARE
#ifdef HAVE_cc0
|| dest == cc0_rtx
#endif
|| CC0_P (dest)
|| (dest == pc_rtx
&& (src == pc_rtx || GET_CODE (src) == RETURN
|| GET_CODE (src) == LABEL_REF))))
......@@ -2682,10 +2677,7 @@ subst_constants (loc, insn, map, memonly)
if (compare_mode != VOIDmode
&& GET_CODE (src) == COMPARE
&& (GET_MODE_CLASS (GET_MODE (src)) == MODE_CC
#ifdef HAVE_cc0
|| dest == cc0_rtx
#endif
)
|| CC0_P (dest))
&& GET_MODE (XEXP (src, 0)) == VOIDmode
&& GET_MODE (XEXP (src, 1)) == VOIDmode)
{
......
......@@ -701,11 +701,7 @@ reversed_comparison_code_parts (code, arg0, arg1, insn)
break;
}
if (GET_MODE_CLASS (mode) == MODE_CC
#ifdef HAVE_cc0
|| arg0 == cc0_rtx
#endif
)
if (GET_MODE_CLASS (mode) == MODE_CC || CC0_P (arg0))
{
rtx prev;
/* Try to search for the comparison to determine the real mode.
......
/* Perform various loop optimizations, including strength reduction.
Copyright (C) 1987, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -9442,11 +9442,9 @@ canonicalize_condition (insn, cond, reverse, earliest, want_reg)
}
}
#ifdef HAVE_cc0
/* Never return CC0; return zero instead. */
if (op0 == cc0_rtx)
if (CC0_P (op0))
return 0;
#endif
return gen_rtx_fmt_ee (code, VOIDmode, op0, op1);
}
......
......@@ -2177,11 +2177,7 @@ simplify_relational_operation (code, mode, op0, op1)
/* We can't simplify MODE_CC values since we don't know what the
actual comparison is. */
if (GET_MODE_CLASS (GET_MODE (op0)) == MODE_CC
#ifdef HAVE_cc0
|| op0 == cc0_rtx
#endif
)
if (GET_MODE_CLASS (GET_MODE (op0)) == MODE_CC || CC0_P (op0))
return 0;
/* Make sure the constant is second. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment