]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/54879 (gcc/combine.c:12018: warning: comparison always false due...
authorJakub Jelinek <jakub@redhat.com>
Wed, 10 Oct 2012 10:41:39 +0000 (12:41 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 10 Oct 2012 10:41:39 +0000 (12:41 +0200)
PR middle-end/54879
* combine.c (count_rtxs): Use RTX_BIN_ARITH resp. RTX_COMM_ARITH
instead of '2' resp. 'c' for GET_RTX_CLASS comparisons.

From-SVN: r192303

gcc/ChangeLog
gcc/combine.c

index 72e19fcc60d2b12f061786ace5440ae81c2fdba8..54cc03ca711d1c1c961ee9474bb3dacf692f5a7f 100644 (file)
@@ -1,5 +1,9 @@
 2012-10-10  Jakub Jelinek  <jakub@redhat.com>
 
+       PR middle-end/54879
+       * combine.c (count_rtxs): Use RTX_BIN_ARITH resp. RTX_COMM_ARITH
+       instead of '2' resp. 'c' for GET_RTX_CLASS comparisons.
+
        PR middle-end/54862
        * simplify-rtx.c (simplify_truncation): Compare UINTVAL instead of
        INTVAL of second argument with precision resp. op_precision.
index 4e0a57963dc4b6f6e0b34da1aa4c4ba56af5a3c0..c13d00408ad8b7fdae55ef8a6b49e4e229942e40 100644 (file)
@@ -12015,8 +12015,8 @@ count_rtxs (rtx x)
   const char *fmt;
   int i, j, ret = 1;
 
-  if (GET_RTX_CLASS (code) == '2'
-      || GET_RTX_CLASS (code) == 'c')
+  if (GET_RTX_CLASS (code) == RTX_BIN_ARITH
+      || GET_RTX_CLASS (code) == RTX_COMM_ARITH)
     {
       rtx x0 = XEXP (x, 0);
       rtx x1 = XEXP (x, 1);
@@ -12024,15 +12024,15 @@ count_rtxs (rtx x)
       if (x0 == x1)
        return 1 + 2 * count_rtxs (x0);
 
-      if ((GET_RTX_CLASS (GET_CODE (x1)) == '2'
-          || GET_RTX_CLASS (GET_CODE (x1)) == 'c')
+      if ((GET_RTX_CLASS (GET_CODE (x1)) == RTX_BIN_ARITH
+          || GET_RTX_CLASS (GET_CODE (x1)) == RTX_COMM_ARITH)
          && (x0 == XEXP (x1, 0) || x0 == XEXP (x1, 1)))
        return 2 + 2 * count_rtxs (x0)
               + count_rtxs (x == XEXP (x1, 0)
                             ? XEXP (x1, 1) : XEXP (x1, 0));
 
-      if ((GET_RTX_CLASS (GET_CODE (x0)) == '2'
-          || GET_RTX_CLASS (GET_CODE (x0)) == 'c')
+      if ((GET_RTX_CLASS (GET_CODE (x0)) == RTX_BIN_ARITH
+          || GET_RTX_CLASS (GET_CODE (x0)) == RTX_COMM_ARITH)
          && (x1 == XEXP (x0, 0) || x1 == XEXP (x0, 1)))
        return 2 + 2 * count_rtxs (x1)
               + count_rtxs (x == XEXP (x0, 0)