public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Add testcase for PR68482
@ 2015-11-23  9:15 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2015-11-23  9:15 UTC (permalink / raw)
  To: gcc-patches


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" } } */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-23  9:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-23  9:15 [PATCH] Add testcase for PR68482 Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).