Add test-case (PR tree-optimization/66278).
authorMartin Liska <mliska@suse.cz>
Fri, 21 Apr 2017 08:50:19 +0000 (10:50 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Fri, 21 Apr 2017 08:50:19 +0000 (08:50 +0000)
2017-04-21  Martin Liska  <mliska@suse.cz>

PR tree-optimization/66278
* gcc.dg/vect/pr66278.c: New test.

From-SVN: r247051

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr66278.c [new file with mode: 0644]

index ddee40285f363a246e5cd48cffc16549d49d56e9..909f258c206e2cf751e342a0a92bede97b34936a 100644 (file)
@@ -1,3 +1,8 @@
+2017-04-21  Martin Liska  <mliska@suse.cz>
+
+       PR tree-optimization/66278
+       * gcc.dg/vect/pr66278.c: New test.
+
 2017-04-21  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/80237
diff --git a/gcc/testsuite/gcc.dg/vect/pr66278.c b/gcc/testsuite/gcc.dg/vect/pr66278.c
new file mode 100644 (file)
index 0000000..3e0e2ec
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+#define N 101
+
+typedef unsigned int __uint32_t;
+
+int main(int argc, char **argv)
+{
+  __uint32_t array[N][N][N];
+
+  const unsigned int next = argc == 3 ? 0 : 1;
+
+  for (unsigned i = next; i < N;  i++)
+    array[3][3][i] = array[3][3][i] - 10;
+
+  return array[3][3][argc];
+}
+
+/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 1 "vect" } } */
+/* { dg-require-effective-target vect_int } */