/* { dg-require-effective-target vect_int } */
+/* The SLP vectorization happens as part of the if-converted loop body. */
+/* { dg-additional-options "-fdump-tree-vect-details" } */
#include <stdarg.h>
#include "tree-vect.h"
unsigned int *pin = &in[0];
unsigned int *pout = &out[0];
unsigned int a = 0;
-
- i = N;
- if (i > 0)
+
+ for (i = 0; i < N; i++)
{
- do
- {
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- if (arr[i] = i)
- a = i;
- else
- a = 2;
- }
- while (i < N);
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ if (arr[i] = i)
+ a = i;
+ else
+ a = 2;
}
a = 0;
- /* check results: */
- i = N;
- if (i > 0)
+ /* check results: */
+ for (i = 0; i < N; i++)
{
- do
- {
- if (out[i*8] != in[i*8] + a
- || out[i*8 + 1] != in[i*8 + 1] + a
- || out[i*8 + 2] != in[i*8 + 2] + a
- || out[i*8 + 3] != in[i*8 + 3] + a
- || out[i*8 + 4] != in[i*8 + 4] + a
- || out[i*8 + 5] != in[i*8 + 5] + a
- || out[i*8 + 6] != in[i*8 + 6] + a
- || out[i*8 + 7] != in[i*8 + 7] + a)
- abort ();
+ if (out[i*8] != in[i*8] + a
+ || out[i*8 + 1] != in[i*8 + 1] + a
+ || out[i*8 + 2] != in[i*8 + 2] + a
+ || out[i*8 + 3] != in[i*8 + 3] + a
+ || out[i*8 + 4] != in[i*8 + 4] + a
+ || out[i*8 + 5] != in[i*8 + 5] + a
+ || out[i*8 + 6] != in[i*8 + 6] + a
+ || out[i*8 + 7] != in[i*8 + 7] + a)
+ abort ();
- if (arr[i] = i)
- a = i;
- else
- a = 2;
- i++;
- }
- while (i < N);
+ if (arr[i] = i)
+ a = i;
+ else
+ a = 2;
}
return 0;
return 0;
}
-/* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "slp1" } } */
+/* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "vect" } } */