[PATCH] Add testcase for PR68482
Richard Biener
rguenther@suse.de
Mon Nov 23 09:15:00 GMT 2015
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" } } */
More information about the Gcc-patches
mailing list