c-common.c (handle_mode_attribute): Use VECTOR_MODE_P macro.
authorAldy Hernandez <aldyh@redhat.com>
Fri, 13 Jun 2003 19:27:29 +0000 (19:27 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Fri, 13 Jun 2003 19:27:29 +0000 (19:27 +0000)
2003-06-13  Aldy Hernandez  <aldyh@redhat.com>

        * c-common.c (handle_mode_attribute): Use VECTOR_MODE_P macro.

        * simplify-rtx.c (simplify_subreg): Same.

        * emit-rtl.c (gen_lowpart_common): Same.

From-SVN: r67911

gcc/ChangeLog
gcc/c-common.c
gcc/emit-rtl.c
gcc/simplify-rtx.c

index 1badeea04711d63850d43f5c5c28b4d0569e84ae..8416f98f8963e94d44df7911a52969f877969cae 100644 (file)
@@ -1,3 +1,11 @@
+2003-06-13  Aldy Hernandez  <aldyh@redhat.com>
+
+        * c-common.c (handle_mode_attribute): Use VECTOR_MODE_P macro.
+
+        * simplify-rtx.c (simplify_subreg): Same.
+
+        * emit-rtl.c (gen_lowpart_common): Same.
+
 2003-06-13  Kazu Hirata  <kazu@cs.umass.edu>
 
        * builtins.c: Fix comment typos.
index d194012e9560cb5b29b1da9c620860d6831ad98a..30a7db74efb3a46c2083da0fdeba95817f17bb53 100644 (file)
@@ -5215,9 +5215,7 @@ handle_mode_attribute (node, name, args, flags, no_add_attrs)
        {
          /* If this is a vector, make sure we either have hardware
             support, or we can emulate it.  */
-         if ((GET_MODE_CLASS (mode) == MODE_VECTOR_INT
-              || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
-             && !vector_mode_valid_p (mode))
+         if (VECTOR_MODE_P (mode) && !vector_mode_valid_p (mode))
            {
              error ("unable to emulate '%s'", GET_MODE_NAME (mode));
              return NULL_TREE;
index 03ee0caf75c0e1a0af14f5dc1b866af57ca453c1..4590bf252709344ee1d51961ddbb340efe66cd49 100644 (file)
@@ -1155,9 +1155,7 @@ gen_lowpart_common (mode, x)
   else if (GET_CODE (x) == SUBREG || GET_CODE (x) == REG
           || GET_CODE (x) == CONCAT || GET_CODE (x) == CONST_VECTOR)
     return simplify_gen_subreg (mode, x, GET_MODE (x), offset);
-  else if ((GET_MODE_CLASS (mode) == MODE_VECTOR_INT
-           || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT)
-          && GET_MODE (x) == VOIDmode)
+  else if (VECTOR_MODE_P (mode) && GET_MODE (x) == VOIDmode)
     return simplify_gen_subreg (mode, x, int_mode_for_mode (mode), offset);
   /* If X is a CONST_INT or a CONST_DOUBLE, extract the appropriate bits
      from the low-order part of the constant.  */
index e4af67564a9856b71cdeb44d79d0dae4ffb83eec..9738566e09e1fe49e19be8837c3221360a6822f0 100644 (file)
@@ -2707,8 +2707,7 @@ simplify_subreg (outermode, op, innermode, byte)
       int offset, part;
       unsigned HOST_WIDE_INT val = 0;
 
-      if (GET_MODE_CLASS (outermode) == MODE_VECTOR_INT
-         || GET_MODE_CLASS (outermode) == MODE_VECTOR_FLOAT)
+      if (VECTOR_MODE_P (outermode))
        {
          /* Construct a CONST_VECTOR from individual subregs.  */
          enum machine_mode submode = GET_MODE_INNER (outermode);