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]

[PATCH] Add testcase for PR68482


Committed.

Richard.

2015-11-23  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/68482
	* gcc.dg/vect/pr68482.c: New testcase.

Index: gcc/testsuite/gcc.dg/vect/pr68482.c
===================================================================
--- gcc/testsuite/gcc.dg/vect/pr68482.c	(revision 0)
+++ gcc/testsuite/gcc.dg/vect/pr68482.c	(working copy)
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+void test(int* input, int* out, unsigned x1, unsigned x2)
+{
+  unsigned i, j;
+  unsigned end = x1;
+
+  for(i = j = 0; i < 1000; i++) {
+      int sum = 0;
+      end += x2;
+      for( ; j < end; j++)
+	sum += input[j];
+      out[i] = sum;
+  }
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */


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