re PR tree-optimization/57206 (Auto-vectorization fails when array index is an unsign...
authorBin Cheng <bin.cheng@arm.com>
Thu, 5 May 2016 16:20:54 +0000 (16:20 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Thu, 5 May 2016 16:20:54 +0000 (16:20 +0000)
gcc/testsuite
PR tree-optimization/57206
* gcc.dg/vect/pr57206.c: New test.

From-SVN: r235926

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

index 79488a217a6fa07441e75c5873c3f62eb36491da..9ec6eb7c322015fa75e5bb035abb1d13980600f0 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-05  Bin Cheng  <bin.cheng@arm.com>
+
+       PR tree-optimization/57206
+       * gcc.dg/vect/pr57206.c: New test.
+
 2016-05-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * gcc.dg/ipa/inline-8.c (isnanf): Declare.
diff --git a/gcc/testsuite/gcc.dg/vect/pr57206.c b/gcc/testsuite/gcc.dg/vect/pr57206.c
new file mode 100644 (file)
index 0000000..009688e
--- /dev/null
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_float } */
+
+void bad0(float * d, unsigned int n)
+{
+  unsigned int i;
+  for (i=n; i>0; --i) 
+    d[n-i] = 0.0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */