combine.c (combine_simplify_rtx, [...]): Use CC0_P.
authorRoger Sayle <roger@eyesopen.com>
Wed, 26 Feb 2003 03:05:40 +0000 (03:05 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Wed, 26 Feb 2003 03:05:40 +0000 (03:05 +0000)
* 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

gcc/ChangeLog
gcc/combine.c
gcc/cse.c
gcc/integrate.c
gcc/jump.c
gcc/loop.c
gcc/simplify-rtx.c

index 8d0407b..a227392 100644 (file)
@@ -1,5 +1,14 @@
 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.
index 126f900..fe5cce5 100644 (file)
@@ -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;
 
index d9e9fad..6c763f4 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -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;
 
index 5f050ff..576d824 100644 (file)
@@ -1,6 +1,6 @@
 /* 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)
              {
index b4e0d1c..e18abef 100644 (file)
@@ -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.
index 4bdef2d..1b2acec 100644 (file)
@@ -1,6 +1,6 @@
 /* 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);
 }
index 9d3b213..0bd9b60 100644 (file)
@@ -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.  */