tree-vectorizer.c (vect_is_simple_reduction): Compare types using TYPE_MAIN_VARIANT.
authorRichard Henderson <rth@redhat.com>
Wed, 29 Jun 2005 00:36:31 +0000 (17:36 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 29 Jun 2005 00:36:31 +0000 (17:36 -0700)
        * tree-vectorizer.c (vect_is_simple_reduction): Compare types
        using TYPE_MAIN_VARIANT.

From-SVN: r101407

gcc/ChangeLog
gcc/tree-vectorizer.c

index bd0a65ca5fdf6dd7ae28ccbb91f76a7c50aa93ef..aaf27cfc07b8fb6fe3f47a97103c7fa25f7478bf 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-28  Richard Henderson  <rth@redhat.com>
+
+       * tree-vectorizer.c (vect_is_simple_reduction): Compare types
+       using TYPE_MAIN_VARIANT.
+
 2005-06-28  Richard Henderson  <rth@redhat.com>
 
        * config/ia64/ia64.c (ia64_expand_vecint_compare): Decompose to EQ
index cf16f66628a6a84611157a47d88425abdaa317f9..169b3060039e753baeeac8958fa83352dc621248 100644 (file)
@@ -1870,9 +1870,10 @@ vect_is_simple_reduction (struct loop *loop ATTRIBUTE_UNUSED,
       return NULL_TREE;
     }
 
-  /* Check that it's ok to change the order of the computation  */
+  /* Check that it's ok to change the order of the computation.  */
   type = TREE_TYPE (operation);
-  if (type != TREE_TYPE (op1) || type != TREE_TYPE (op2))
+  if (TYPE_MAIN_VARIANT (type) != TYPE_MAIN_VARIANT (TREE_TYPE (op1))
+      || TYPE_MAIN_VARIANT (type) != TYPE_MAIN_VARIANT (TREE_TYPE (op2)))
     {
       if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC))
         {