This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Add testcase for PR68482
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 23 Nov 2015 10:10:33 +0100 (CET)
- Subject: [PATCH] Add testcase for PR68482
- Authentication-results: sourceware.org; auth=none
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" } } */