This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PING^2 for vectorization and toplevel patches



This is also OK for mainline, provided that you keep your
promise (to Joseph Myers) to eventually add the documentation
for UNITS_PER_SIMD_WORD.

I've included it now.


Since I was at it, I tweaked UNITS_PER_WORD (nearby) to mention 8 as a reasonable value (previously it only said 4!).

For example, renaming the functions
to begin with vect_

Done.


new documentation describing the new
transformations (in passes.texi?)

Like for UNITS_FOR_SIMD_WORD, there is absolutely no mention of a vectorizer in passes.texi except for if-conversion. I don't think I'm most suited to write it so I'm CCing Dorit; I will take care of it if she asks me so, anyway.


an perhaps changes to your new testcases

The agreement with Janis was to put the testcases in the tree-ssa directory, because they do not require a special driver.


Bootstrapped/regtested powerpc-apple-darwin7.8.0, ok for mainline?

Paolo
2004-04-20  Paolo Bonzini  <bonzini@gnu.org>

	* tree-complex.c (gate_expand_vector_operations): New.
	(pass_lower_vector_ssa): Use it.
	* tree-optimize.c (init_tree_optimization_passes): Include
	pass_lower_vector_ssa.
	* tree-vect-transform.c (vect_min_worthwhile_factor): New.
	(vectorizable_operation): Use it.
	* tree-vectorizer.c (get_vectype_for_scalar_type): Accept
	integer modes for the vector type.

	* doc/tm.texi (UNITS_PER_WORD): Mention 64-bit hosts.
	(UNITS_PER_SIMD_WORD): New.

2004-04-20  Paolo Bonzini  <bonzini@gnu.org>

        * gcc.dg/gen-vect-11.c, gcc.dg/gen-vect-11a.c,
        gcc.dg/gen-vect-11b.c, gcc.dg/gen-vect-11c.c,
        gcc.dg/gen-vect-2.c, gcc.dg/gen-vect-25.c,
        gcc.dg/gen-vect-26.c, gcc.dg/gen-vect-28.c,
        gcc.dg/gen-vect-32.c: New.
        * gcc.dg/vect/vect-82.c, gcc.dg/vect/vect-83.c: Fix dg-final.
        * gcc.dg/vect/vect-82_64.c, gcc.dg/vect/vect-83_64.c: Remove xfail,
        don't run on PPC32.

Index: tree-complex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-complex.c,v
retrieving revision 2.20
diff -p -u -u -r2.20 tree-complex.c
--- tree-complex.c	5 Apr 2005 19:04:58 -0000	2.20
+++ tree-complex.c	6 Apr 2005 08:30:26 -0000
@@ -977,6 +977,14 @@ expand_vector_operations_1 (block_stmt_i
   mark_stmt_modified (bsi_stmt (*bsi));
 }
 
+/* Use this to lower vector operations introduced by the vectorizer,
+   if it may need the bit-twiddling tricks implemented in this file.  */
+static bool
+gate_expand_vector_operations (void)
+{
+  return flag_tree_vectorize != 0;
+}
+
 static void
 expand_vector_operations (void)
 {
@@ -1012,8 +1020,8 @@ tree_lower_operations (void)
 
 struct tree_opt_pass pass_lower_vector_ssa = 
 {
-  "vector",				/* name */
-  NULL,					/* gate */
+  "veclower",				/* name */
+  gate_expand_vector_operations,	/* gate */
   expand_vector_operations,		/* execute */
   NULL,					/* sub */
   NULL,					/* next */
Index: tree-optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-optimize.c,v
retrieving revision 2.80
diff -p -u -u -r2.80 tree-optimize.c
--- tree-optimize.c	5 Apr 2005 19:05:02 -0000	2.80
+++ tree-optimize.c	6 Apr 2005 08:30:26 -0000
@@ -422,6 +422,7 @@ init_tree_optimization_passes (void)
   NEXT_PASS (pass_iv_canon);
   NEXT_PASS (pass_if_conversion);
   NEXT_PASS (pass_vectorize);
+  NEXT_PASS (pass_lower_vector_ssa);
   NEXT_PASS (pass_complete_unroll);
   NEXT_PASS (pass_iv_optimize);
   NEXT_PASS (pass_loop_done);
Index: tree-vect-transform.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-vect-transform.c,v
retrieving revision 2.9
diff -p -u -u -r2.9 tree-vect-transform.c
--- tree-vect-transform.c	29 Mar 2005 17:45:39 -0000	2.9
+++ tree-vect-transform.c	6 Apr 2005 08:30:28 -0000
@@ -711,6 +711,32 @@ vectorizable_assignment (tree stmt, bloc
 }
 
 
+/* Function vect_min_worthwhile_factor.
+
+   For a loop where we could vectorize the operation indicated by CODE,
+   return the minimum vectorization factor that makes it worthwhile
+   to use generic vectors.  */
+static int
+vect_min_worthwhile_factor (enum tree_code code)
+{
+  switch (code)
+    {
+    case PLUS_EXPR:
+    case MINUS_EXPR:
+    case NEGATE_EXPR:
+      return 4;
+
+    case BIT_AND_EXPR:
+    case BIT_IOR_EXPR:
+    case BIT_XOR_EXPR:
+    case BIT_NOT_EXPR:
+      return 2;
+
+    default:
+      return INT_MAX;
+    }
+}
+
 /* Function vectorizable_operation.
 
    Check if STMT performs a binary or unary operation that can be vectorized. 
@@ -768,6 +794,15 @@ vectorizable_operation (tree stmt, block
 	}	
     } 
 
+  /* Worthwhile without SIMD support?  */
+  if (!VECTOR_MODE_P (TYPE_MODE (vectype))
+      && LOOP_VINFO_VECT_FACTOR (loop_vinfo) < vect_min_worthwhile_factor (code))
+    {
+      if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC))
+	fprintf (vect_dump, "not worthwhile without SIMD support.");
+      return false;
+    }
+
   /* Supportable by target?  */
   if (!optab)
     {
Index: tree-vectorizer.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-vectorizer.c,v
retrieving revision 2.84
diff -p -u -u -r2.84 tree-vectorizer.c
--- tree-vectorizer.c	5 Apr 2005 19:05:16 -0000	2.84
+++ tree-vectorizer.c	6 Apr 2005 08:30:29 -0000
@@ -1642,11 +1639,9 @@ get_vectype_for_scalar_type (tree scalar
       print_generic_expr (vect_dump, vectype, TDF_SLIM);
     }
 
-  if (!VECTOR_MODE_P (TYPE_MODE (vectype)))
+  if (!VECTOR_MODE_P (TYPE_MODE (vectype))
+      && !INTEGRAL_MODE_P (TYPE_MODE (vectype)))
     {
-      /* TODO: tree-complex.c sometimes can parallelize operations
-         on generic vectors.  We can vectorize the loop in that case,
-         but then we should re-run the lowering pass.  */
       if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC))
         fprintf (vect_dump, "mode not supported by target.");
       return NULL_TREE;
Index: testsuite/gcc.dg/tree-ssa/gen-vect-11.c
===================================================================
RCS file: testsuite/gcc.dg/tree-ssa/gen-vect-11.c
diff -N testsuite/gcc.dg/tree-ssa/gen-vect-11.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/tree-ssa/gen-vect-11.c	21 Apr 2005 16:59:48 -0000
@@ -0,0 +1,32 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 16
+
+int main ()
+{
+  int i;
+  char ia[N];
+  char ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+  char ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+
+  for (i = 0; i < N; i++)
+    {
+      ia[i] = ib[i] + ic[i];
+    }
+
+  /* check results:  */
+  for (i = 0; i < N; i++)
+    {
+      if (ia[i] != ib[i] + ic[i])
+        abort ();
+    }
+
+  return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/tree-ssa/gen-vect-11a.c
===================================================================
RCS file: testsuite/gcc.dg/tree-ssa/gen-vect-11a.c
diff -N testsuite/gcc.dg/tree-ssa/gen-vect-11a.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/tree-ssa/gen-vect-11a.c	21 Apr 2005 16:59:48 -0000
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 16
+
+#if __LONG_MAX__ == 2147483647
+typedef short half_word;
+#else
+typedef int half_word;
+#endif
+
+int main ()
+{
+  int i;
+  half_word ia[N];
+  half_word ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+  half_word ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+
+  for (i = 0; i < N; i++)
+    {
+      ia[i] = ib[i] & ic[i];
+    }
+
+  /* check results:  */
+  for (i = 0; i < N; i++)
+    {
+      if (ia[i] != ib[i] & ic[i])
+        abort ();
+    }
+
+  return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/tree-ssa/gen-vect-11b.c
===================================================================
RCS file: testsuite/gcc.dg/tree-ssa/gen-vect-11b.c
diff -N testsuite/gcc.dg/tree-ssa/gen-vect-11b.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/tree-ssa/gen-vect-11b.c	21 Apr 2005 16:59:48 -0000
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 16
+
+int main ()
+{
+  int i;
+  char ia[N];
+  char ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+  char ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+
+  /* Not vectorizable, multiplication */
+  for (i = 0; i < N; i++)
+    {
+      ia[i] = ib[i] * ic[i];
+    }
+
+  /* check results:  */
+  for (i = 0; i < N; i++)
+    {
+      if (ia[i] != (char) (ib[i] * ic[i]))
+        abort ();
+    }
+
+  return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/tree-ssa/gen-vect-11c.c
===================================================================
RCS file: testsuite/gcc.dg/tree-ssa/gen-vect-11c.c
diff -N testsuite/gcc.dg/tree-ssa/gen-vect-11c.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/tree-ssa/gen-vect-11c.c	21 Apr 2005 16:59:48 -0000
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 16
+
+#if LONG_MAX == 2147483647
+typedef short half_word;
+#else
+typedef int half_word;
+#endif
+
+int main ()
+{
+  int i;
+  half_word ia[N];
+  half_word ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+  half_word ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+
+  /* Not worthwhile, only 2 parts per int */
+  for (i = 0; i < N; i++)
+    {
+      ia[i] = ib[i] + ic[i];
+    }
+
+  /* check results:  */
+  for (i = 0; i < N; i++)
+    {
+      if (ia[i] != ib[i] + ic[i])
+        abort ();
+    }
+
+  return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/tree-ssa/gen-vect-2.c
===================================================================
RCS file: testsuite/gcc.dg/tree-ssa/gen-vect-2.c
diff -N testsuite/gcc.dg/tree-ssa/gen-vect-2.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/tree-ssa/gen-vect-2.c	21 Apr 2005 16:59:48 -0000
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 16
+ 
+#if __LONG_MAX__ == 2147483647
+typedef short half_word;
+#else
+typedef int half_word;
+#endif
+
+int main ()
+{
+  half_word cb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+  half_word ca[N];
+  int i;
+
+  for (i = 0; i < N; i++)
+    {
+      ca[i] = cb[i];
+    }
+
+  /* check results:  */
+  for (i = 0; i < N; i++)
+    {
+      if (ca[i] != cb[i])
+        abort ();
+    }
+
+  return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/tree-ssa/gen-vect-25.c
===================================================================
RCS file: testsuite/gcc.dg/tree-ssa/gen-vect-25.c
diff -N testsuite/gcc.dg/tree-ssa/gen-vect-25.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/tree-ssa/gen-vect-25.c	21 Apr 2005 16:59:48 -0000
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 128
+
+#if __LONG_MAX__ == 2147483647
+typedef short half_word;
+#else
+typedef int half_word;
+#endif
+
+int main (int n, int *p)
+{
+  int i;
+  half_word ib[N];
+  half_word ia[N];
+  int k;
+
+  for (i = 0; i < N; i++)
+    {
+      ia[i] = n;
+    }
+
+  /* check results:  */
+  for (i = 0; i < N; i++)
+    {
+      if (ia[i] != n)
+        abort ();
+    }
+
+  k = *p;
+  for (i = 0; i < N; i++)
+    {
+      ib[i] = k;
+    }
+
+  /* check results:  */
+  for (i = 0; i < N; i++)
+    {
+      if (ib[i] != k)
+        abort ();
+    }
+
+  return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/tree-ssa/gen-vect-26.c
===================================================================
RCS file: testsuite/gcc.dg/tree-ssa/gen-vect-26.c
diff -N testsuite/gcc.dg/tree-ssa/gen-vect-26.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/tree-ssa/gen-vect-26.c	21 Apr 2005 16:59:48 -0000
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 128
+
+/* unaligned store.  */
+
+int main ()
+{
+  int i;
+  char ia[N+1];
+
+  for (i = 1; i <= N; i++)
+    {
+      ia[i] = 5;
+    }
+
+  /* check results:  */
+  for (i = 1; i <= N; i++)
+    {
+      if (ia[i] != 5)
+        abort ();
+    }
+
+  return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/tree-ssa/gen-vect-28.c
===================================================================
RCS file: testsuite/gcc.dg/tree-ssa/gen-vect-28.c
diff -N testsuite/gcc.dg/tree-ssa/gen-vect-28.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/tree-ssa/gen-vect-28.c	21 Apr 2005 16:59:48 -0000
@@ -0,0 +1,35 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 128
+#define OFF 3
+
+/* unaligned store.  */
+
+int main (int off)
+{
+  int i;
+  char ia[N+OFF];
+
+  for (i = 0; i < N; i++)
+    {
+      ia[i+off] = 5;
+    }
+
+  /* check results:  */
+  for (i = 0; i < N; i++)
+    {
+      if (ia[i+off] != 5)
+        abort ();
+    }
+
+  return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/tree-ssa/gen-vect-32.c
===================================================================
RCS file: testsuite/gcc.dg/tree-ssa/gen-vect-32.c
diff -N testsuite/gcc.dg/tree-ssa/gen-vect-32.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/tree-ssa/gen-vect-32.c	21 Apr 2005 16:59:48 -0000
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
+
+#include <stdlib.h>
+
+#define N 16
+ 
+int main ()
+{  
+  struct {
+    char ca[N];
+  } s;
+  int i;
+
+  for (i = 0; i < N; i++)
+    {
+      s.ca[i] = 5;
+    }
+
+  /* check results:  */
+  for (i = 0; i < N; i++)
+    {
+      if (s.ca[i] != 5)
+        abort ();
+    }
+
+  return 0;
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/vect/vect-82.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/vect/vect-82.c,v
retrieving revision 1.3
diff -p -u -u -r1.3 vect-82.c
--- testsuite/gcc.dg/vect/vect-82.c	31 Mar 2005 18:34:19 -0000	1.3
+++ testsuite/gcc.dg/vect/vect-82.c	6 Apr 2005 08:30:33 -0000
@@ -32,5 +32,5 @@ int main (void)
   return main1 ();
 } 
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/vect/vect-82_64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/vect/vect-82_64.c,v
retrieving revision 1.3
diff -p -u -u -r1.3 vect-82_64.c
--- testsuite/gcc.dg/vect/vect-82_64.c	31 Mar 2005 18:34:19 -0000	1.3
+++ testsuite/gcc.dg/vect/vect-82_64.c	6 Apr 2005 08:30:34 -0000
@@ -1,4 +1,5 @@
-/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target { powerpc*-*-* && lp64 } } } */
+/* { dg-do compile { target { powerpc*-*-* && ilp32 } } } */
 /* { dg-options "-O2 -ftree-vectorize -mpowerpc64 -fdump-tree-vect-stats -maltivec" } */
 
 #include <stdarg.h>
@@ -33,5 +34,5 @@ int main (void)
   return main1 ();
 } 
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/vect/vect-83.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/vect/vect-83.c,v
retrieving revision 1.3
diff -p -u -u -r1.3 vect-83.c
--- testsuite/gcc.dg/vect/vect-83.c	31 Mar 2005 18:34:19 -0000	1.3
+++ testsuite/gcc.dg/vect/vect-83.c	6 Apr 2005 08:30:34 -0000
@@ -32,5 +32,5 @@ int main (void)
   return main1 ();
 } 
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: testsuite/gcc.dg/vect/vect-83_64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/vect/vect-83_64.c,v
retrieving revision 1.3
diff -p -u -u -r1.3 vect-83_64.c
--- testsuite/gcc.dg/vect/vect-83_64.c	31 Mar 2005 18:34:19 -0000	1.3
+++ testsuite/gcc.dg/vect/vect-83_64.c	6 Apr 2005 08:30:34 -0000
@@ -1,4 +1,5 @@
-/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-do run { target { powerpc*-*-* && lp64 } } } */
+/* { dg-do compile { target { powerpc*-*-* && ilp32 } } } */
 /* { dg-options "-O2 -ftree-vectorize -mpowerpc64 -fdump-tree-vect-stats -maltivec" } */
 
 #include <stdarg.h>
@@ -33,5 +34,5 @@ int main (void)
   return main1 ();
 } 
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
Index: doc/tm.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/tm.texi,v
retrieving revision 1.423
diff -p -u -u -r1.423 tm.texi
--- doc/tm.texi	15 Apr 2005 10:24:13 -0000	1.423
+++ doc/tm.texi	21 Apr 2005 20:45:07 -0000
@@ -1076,7 +1076,15 @@ largest value that @code{BITS_PER_WORD} 
 @end defmac
 
 @defmac UNITS_PER_WORD
-Number of storage units in a word; normally 4.
+Number of storage units in a word; normally the size of a pointer,
+either 4 or 8.
+@end defmac
+
+@defmac UNITS_PER_SIMD_WORD
+Number of units in the vectors that the vectorizer can produce.
+The default is equal to @code{UNITS_PER_WORD}, because the vectorizer
+can do some transformations even in absence of specialized @acronym{SIMD}
+hardware.
 @end defmac
 
 @defmac MIN_UNITS_PER_WORD

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]