+2016-06-24 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/vect/vect-nb-iter-ub-1.c: Remove default vector
+ testsuite compile flags.
+ * gcc.dg/vect/vect-nb-iter-ub-2.c: Ditto.
+ * gcc.dg/vect/vect-nb-iter-ub-3.c: Ditto.
+
+2016-06-24 Uros Bizjak <ubizjak@gmail.com>
+
+ * g++dg/vect/pr36684.cc: Add dg-do compile.
+ * gcc.dg/vect/O3-pr70130.c: Remove dg-do run.
+ * gcc.dg/vect/pr70021.c: Ditto.
+ * gcc.dg/vect/pr70138-1.c: Ditto.
+ * gcc.dg/vect/pr70138-2.c: Ditto.
+ * gcc.dg/vect/pr70354-1.c: Ditto.
+ * gcc.dg/vect/pr70354-2.c: Ditto.
+ * gcc.dg/vect/pr71259.c: Ditto.
+ * gcc.dg/vect/pr71416-1.c: Ditto.
+ * gcc.dg/vect/slp-43.c: Ditto.
+ * gcc.dg/vect/slp-45.c: Ditto.
+ * gcc.dg/vect/vect-nb-iter-ub-1.c: Ditto.
+ * gcc.dg/vect/vect-nb-iter-ub-2.c: Ditto.
+ * gcc.dg/vect/vect-nb-iter-ub-3.c: Ditto.
+ * gfortran.dg/vect/pr69980.f90: Ditto.
+
+2016-06-24 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/vect/O3-pr70130.c: Include tree-vect.h and call check_vect.
+ * gcc.dg/vect/bb-slp-30.c: Ditto.
+ * gcc.dg/vect/costmodel/i386/costmodel-vect-33.c: Ditto.
+ * gcc.dg/vect/fast-math-bb-slp-call-3.c: Ditto.
+ * gcc.dg/vect/pr45902.c: Ditto.
+ * gcc.dg/vect/pr48172.c: Ditto.
+ * gcc.dg/vect/pr48377.c: Ditto.
+ * gcc.dg/vect/pr49038.c: Ditto.
+ * gcc.dg/vect/pr49771.c: Ditto.
+ * gcc.dg/vect/pr52091.c: Ditto.
+ * gcc.dg/vect/pr53185-2.c: Ditto.
+ * gcc.dg/vect/pr56826.c: Ditto.
+ * gcc.dg/vect/pr60276.c: Ditto.
+ * gcc.dg/vect/pr62021.c: Ditto.
+ * gcc.dg/vect/pr63530.c: Ditto.
+ * gcc.dg/vect/pr65518.c: Ditto.
+ * gcc.dg/vect/pr65947-1.c: Ditto.
+ * gcc.dg/vect/pr65947-10.c: Ditto.
+ * gcc.dg/vect/pr65947-11.c: Ditto.
+ * gcc.dg/vect/pr65947-12.c: Ditto.
+ * gcc.dg/vect/pr65947-13.c: Ditto.
+ * gcc.dg/vect/pr65947-2.c: Ditto.
+ * gcc.dg/vect/pr65947-3.c: Ditto.
+ * gcc.dg/vect/pr65947-4.c: Ditto.
+ * gcc.dg/vect/pr65947-5.c: Ditto.
+ * gcc.dg/vect/pr65947-6.c: Ditto.
+ * gcc.dg/vect/pr65947-7.c: Ditto.
+ * gcc.dg/vect/pr65947-8.c: Ditto.
+ * gcc.dg/vect/pr65947-9.c: Ditto.
+ * gcc.dg/vect/pr71416-1.c: Ditto.
+ * gcc.dg/vect/pr71439.c: Ditto.
+ * gcc.dg/vect/slp-widen-mult-half.c: Ditto.
+ * gcc.dg/vect/vect-bswap16.c: Ditto.
+ * gcc.dg/vect/vect-bswap32.c: Ditto.
+ * gcc.dg/vect/vect-bswap64.c: Ditto.
+ * gcc.dg/vect/vect-live-1.c: Ditto.
+ * gcc.dg/vect/vect-live-2.c: Ditto.
+ * gcc.dg/vect/vect-live-3.c: Ditto.
+ * gcc.dg/vect/vect-live-4.c: Ditto.
+ * gcc.dg/vect/vect-live-5.c: Ditto.
+ * gcc.dg/vect/vect-live-slp-1.c: Ditto.
+ * gcc.dg/vect/vect-live-slp-2.c: Ditto.
+ * gcc.dg/vect/vect-live-slp-3.c: Ditto.
+ * gcc.dg/vect/vect-nb-iter-ub-1.c: Ditto.
+ * gcc.dg/vect/vect-nb-iter-ub-2.c: Ditto.
+ * gcc.dg/vect/vect-nb-iter-ub-3.c: Ditto.
+ * gcc.dg/vect/vect-neg-store-1.c: Ditto.
+ * gcc.dg/vect/vect-neg-store-2.c: Ditto.
+ * gcc.dg/vect/vect-outer-pr69720.c: Ditto.
+ * gcc.dg/vect/vect-reduc-mul_1.c: Ditto.
+ * gcc.dg/vect/vect-reduc-mul_2.c: Ditto.
+ * gcc.dg/vect/vect-reduc-or_1.c: Ditto.
+ * gcc.dg/vect/vect-reduc-or_2.c: Ditto.
+ * gcc.dg/vect/vect-widen-mult-const-s16.c: Ditto.
+ * gcc.dg/vect/vect-widen-mult-const-u16.c: Ditto.
+ * gcc.dg/vect/vect-widen-mult-half-u8.c: Ditto.
+ * gcc.dg/vect/vect-widen-mult-half.c: Ditto.
+
2016-06-24 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/torture/float128-cmp-invalid.c (main): Use __builtin_nanq.
+/* { dg-do compile } */
/* { dg-require-effective-target vect_float } */
-// { dg-additional-options "-fdisable-tree-cunrolli" }
+/* { dg-additional-options "-fdisable-tree-cunrolli" } */
struct vector
{
-/* { dg-do run } */
/* { dg-require-effective-target vsx_hw { target powerpc*-*-* } } */
/* { dg-additional-options "-mcpu=power7" { target powerpc*-*-* } } */
+#include "tree-vect.h"
+
struct foo
{
short a[3][16][16];
{
int i;
+ check_vect ();
+
for (i = 0; i < 8; i++)
Loop_err (images + i, s, -1);
/* { dg-require-effective-target vect_int } */
+#include "tree-vect.h"
+
int a[32];
void __attribute__((noinline))
a[21] = 0;
}
-int main() { test1(); return a[21]; }
+int main()
+{
+ check_vect ();
+ test1();
+ return a[21];
+}
/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" } } */
int main (void)
{
+ check_vect ();
+
return main1 ();
}
+#include "tree-vect.h"
+
extern double sqrt (double);
extern double fabs (double);
extern double ceil (double);
{
ufraw_data uf_data;
ufraw_data *uf = &uf_data;
+ check_vect ();
uf->initialWidth = 4;
uf->initialHeight = 5;
ufraw_test(uf);
{
int i;
+ check_vect ();
+
for (i = 0; i < N; i++)
a[i] = i;
+#include "tree-vect.h"
+
extern void *memset(void *s, int c, __SIZE_TYPE__ n);
extern void abort (void);
unsigned int array[ASIZE];
int i;
+ check_vect ();
+
memset(array, 0, sizeof(array));
/* initialize first half of the array */
/* PR tree-optimization/48377 */
/* { dg-require-effective-target non_strict_align } */
+#include "tree-vect.h"
+
typedef unsigned int U __attribute__((__aligned__ (1), __may_alias__));
__attribute__((noinline, noclone)) unsigned int
int
main (void)
{
+ check_vect ();
return foo (buf + 1, 26) != 26;
}
#include <sys/mman.h>
#include <stdio.h>
+#include "tree-vect.h"
#define COUNT 320
#define MMAP_SIZE 0x10000
void *x;
size_t b_offset;
+ check_vect ();
+
x = mmap ((void *) ADDRESS, MMAP_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (x == MAP_FAILED)
extern void abort (void);
#include <stdarg.h>
+#include "tree-vect.h"
static int a[1000];
int
main (void)
{
- int res = foo ();
+ int res;
+ check_vect ();
+ res = foo ();
if (res != 1999)
abort ();
return 0;
/* PR tree-optimization/52091 */
+#include "tree-vect.h"
+
int b, c, d, f;
unsigned h;
extern void abort (void);
int
main ()
{
+ check_vect ();
d = -1;
h = 65;
asm volatile ("" : : : "memory");
+#include "tree-vect.h"
+
void __attribute__((noinline,noclone))
fn1 (int * __restrict f, int * __restrict d, unsigned short a, int c)
{
{
int a[32], b[3 * 32];
int i, off;
+ check_vect ();
for (i = 0; i < 3 * 32; ++i)
b[i] = i;
for (off = 0; off < 8; ++off)
+#include "tree-vect.h"\r
+\r
extern void abort (void);\r
\r
typedef struct {\r
int main()\r
{\r
int i;\r
+ check_vect ();\r
for (i=0; i<100; i++) \r
{\r
B[i].num = i;\r
+#include "tree-vect.h"
extern void abort (void);
int out2[49] = {0};
int s;
+ check_vect ();
+
foo (out + 2, lp + 1, 48);
foo_novec (out2 + 2, lp + 1, 48);
/* { dg-additional-options "-fopenmp-simd" } */
/* { dg-additional-options "-mavx" { target avx_runtime } } */
+#include "tree-vect.h"
+
#pragma omp declare simd linear(y)
__attribute__((noinline)) int *
foo (int *x, int y)
main ()
{
int i;
+ check_vect ();
for (i = 0; i < 1024; i++)
b[i] = &a[1023 - i];
#pragma omp simd
+#include "tree-vect.h"\r
+\r
extern void abort (void);\r
\r
typedef struct giga\r
struct giga g[8];\r
unsigned int n = 1;\r
int i, j;\r
+ check_vect ();\r
for (i = 0; i < 8; ++i)\r
for (j = 0; j < 16; ++j)\r
{\r
/* { dg-require-effective-target vect_condition } */
+#include "tree-vect.h"
+
extern void abort (void) __attribute__ ((noreturn));
#define N 32
31, 32
};
+ check_vect ();
+
int ret = condition_reduction (a, 1);
if (ret != 17)
/* { dg-require-effective-target vect_condition } */
+#include "tree-vect.h"
+
extern void abort (void) __attribute__ ((noreturn));
#define N 32
31.111, 32.322
};
+ check_vect ();
+
float ret = condition_reduction (a, 16.7);
if (ret != (float)10.6)
/* { dg-require-effective-target vect_condition } */
+#include "tree-vect.h"
+
extern void abort (void) __attribute__ ((noreturn));
#define N 37
31, 32, 33, 34, 35, 36, 37
};
+ check_vect ();
+
unsigned int ret = condition_reduction (a, 16, b);
if (ret != 29)
/* { dg-require-effective-target vect_condition } */
+#include "tree-vect.h"
+
extern void abort (void) __attribute__ ((noreturn));
#define N 32
31, 32
};
+ check_vect ();
+
signed int ret = condition_reduction (a, 16);
if (ret != -19)
/* { dg-require-effective-target vect_condition } */
+#include "tree-vect.h"
+
extern void abort (void) __attribute__ ((noreturn));
#define N 32
31, 32
};
+ check_vect ();
+
int ret = condition_reduction (a, 16);
if (ret != 2)
/* { dg-require-effective-target vect_condition } */
+#include "tree-vect.h"
+
extern void abort (void) __attribute__ ((noreturn));
#define N 254
};
__builtin_memset (a+32, 43, N-32);
+ check_vect ();
+
unsigned char ret = condition_reduction (a, 16);
if (ret != 10)
/* { dg-require-effective-target vect_condition } */
+#include "tree-vect.h"
+
extern void abort (void) __attribute__ ((noreturn));
#define N 37
31, 32, 33, 34, 35, 36, 37
};
+ check_vect ();
+
unsigned int ret = condition_reduction (a, 16, b);
if (ret != 13)
/* { dg-require-effective-target vect_condition } */
+#include "tree-vect.h"
+
extern void abort (void) __attribute__ ((noreturn));
#define N 27
21, 22, 23, 24, 25, 26, 27
};
+ check_vect ();
+
int ret = condition_reduction (a, 46);
/* loop should never have found a value. */
/* { dg-require-effective-target vect_condition } */
+#include "tree-vect.h"
+
extern void abort (void) __attribute__ ((noreturn));
#define N 32
31, 32
};
+ check_vect ();
+
unsigned char ret = condition_reduction (a, 16, N);
if (ret != 10)
/* { dg-require-effective-target vect_condition } */
+#include "tree-vect.h"
+
extern void abort (void) __attribute__ ((noreturn));
#define N 30
43, 22, -3, 22, 16, 34, 55, 31, 87, 324
};
+ check_vect ();
+
int ret = condition_reduction (a, 16);
if (ret != -3)
/* { dg-require-effective-target vect_condition } */
+#include "tree-vect.h"
+
extern void abort (void) __attribute__ ((noreturn));
#define N 43
73, 2, 87
};
+ check_vect ();
+
int ret = condition_reduction (a, 16, b);
if (ret != 27)
/* { dg-require-effective-target vect_condition } */
+#include "tree-vect.h"
+
extern void abort (void) __attribute__ ((noreturn));
#define N 27
67, 55, 112, 22, 45, 23, 111
};
+ check_vect ();
+
int ret = condition_reduction (a, 16);
if (ret != 12)
/* { dg-require-effective-target vect_condition } */
+#include "tree-vect.h"
+
extern void abort (void) __attribute__ ((noreturn));
#define N 255
};
__builtin_memset (a+32, 43, N-32);
+ check_vect ();
+
char ret = condition_reduction (a, 16);
if (ret != 10)
/* PR target/70021 */
-/* { dg-do run } */
#include "tree-vect.h"
-/* { dg-do run } */
-
#include "tree-vect.h"
double u[33 * 33];
-/* { dg-do run } */
-
#include "tree-vect.h"
double u[33];
/* PR tree-optimization/70354 */
-/* { dg-do run } */
#ifndef main
#include "tree-vect.h"
/* PR tree-optimization/70354 */
-/* { dg-do run } */
#ifndef main
#include "tree-vect.h"
/* PR tree-optimization/71259 */
-/* { dg-do run } */
/* { dg-additional-options "-O3" } */
/* { dg-additional-options "-mavx" { target avx_runtime } } */
-/* { dg-do run } */
+#include "tree-vect.h"
short a;
char b, e;
int d, f;
int main() {
short g;
+ check_vect ();
for (; e; ++e) {
d = a;
f = 0;
short fn1(int p1, int p2) { return p1 + p2; }
int main() {
+ check_vect ();
a = 0;
for (; a < 30; a = fn1(a, 4)) {
c = b;
-/* { dg-do run } */
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-O3" } */
-/* { dg-do run } */
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-O3" } */
{
int i;
+ check_vect ();
+
for (i = 0; i < N; i++)
{
in[i] = i;
unsigned short expect[N];
int i;
+ check_vect ();
+
for (i = 0; i < N; ++i)
{
arr[i] = i;
unsigned int expect[N];
int i;
+ check_vect ();
+
for (i = 0; i < N; ++i)
{
arr[i] = i;
unsigned long long expect[N];
int i;
+ check_vect ();
+
for (i = 0; i < N; ++i)
{
arr[i] = i;
int a[MAX];
int i;
+ check_vect ();
+
int ret = liveloop (START, MAX, a);
if (ret != MAX + START)
int b[MAX];
int i;
+ check_vect ();
+
for (i=0; i<MAX; i++)
{
__asm__ volatile ("");
int b[MAX];
int i;
+ check_vect ();
+
for (i=0; i<MAX; i++)
{
__asm__ volatile ("");
int b[MAX];
int i;
+ check_vect ();
+
for (i=0; i<MAX; i++)
{
__asm__ volatile ("");
int b = 99;
int i;
+ check_vect ();
+
int ret = liveloop (START, MAX, a, &b);
if (ret != 99)
int b[MAX*4];
int i;
+ check_vect ();
+
for (i=0; i<MAX*4; i++)
{
__asm__ volatile ("");
int b[MAX*4];
int i;
+ check_vect ();
+
for (i=0; i<MAX*2; i++)
{
__asm__ volatile ("");
long b[MAX*4];
int i;
+ check_vect ();
+
for (i=0; i<MAX*4; i++)
{
__asm__ volatile ("");
-/* { dg-do run } */
-/* { dg-require-effective-target sse2 { target { i?86-*-* x86_64-*-* } } } */
-/* { dg-additional-options "-msse2 -fdump-tree-cunroll-details" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-fdump-tree-cunroll-details" } */
+
+#include "tree-vect.h"
int ii[31];
char cc[31] =
int main (int argc, const char **argv)
{
int i;
+ check_vect ();
foo (31);
for (i = 0; i < 31; i++)
if (ii[i] != i)
-/* { dg-do run } */
-/* { dg-require-effective-target sse2 { target { i?86-*-* x86_64-*-* } } } */
-/* { dg-additional-options "-msse2 -fdump-tree-cunroll-details" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-fdump-tree-cunroll-details" } */
+
+#include "tree-vect.h"
int ii[32];
char cc[66] =
int main (int argc, const char **argv)
{
int i;
+ check_vect ();
foo (32);
for (i = 0; i < 32; i++)
if (ii[i] != i)
-/* { dg-do run } */
-/* { dg-require-effective-target sse2 { target { i?86-*-* x86_64-*-* } } } */
-/* { dg-additional-options "-msse2 -fdump-tree-cunroll-details" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-fdump-tree-cunroll-details" } */
+
+#include "tree-vect.h"
int ii[33];
char cc[66] =
int main (int argc, const char **argv)
{
int i;
+ check_vect ();
foo (33);
for (i = 0; i < 33; i++)
if (ii[i] != i)
/* { dg-require-effective-target vect_int } */
+
+#include "tree-vect.h"
+
extern void abort (void);
__attribute__((noinline, noclone))
short x[128 + 32];
int i;
+ check_vect ();
+
for (i = 0; i < 16; i ++)
{
asm ("");
/* { dg-require-effective-target vect_int } */
+
+#include "tree-vect.h"
+
extern void abort (void);
__attribute__((noinline, noclone))
short x[128 + 32];
int i;
+ check_vect ();
+
for (i = 0; i < 16; i ++)
{
asm ("");
+#include "tree-vect.h"
+
extern void abort (void);
int a[128];
int main()
{
+ check_vect ();
foo ();
if (b[0] != 33. || b[1] != 34.
|| b[2] != 35. || b[3] != 36.)
/* Write a reduction loop to be reduced using vector shifts. */
+#include "tree-vect.h"
+
extern void abort(void);
unsigned char in[16];
unsigned char i = 0;
unsigned char sum = 1;
+ check_vect ();
+
for (i = 0; i < 16; i++)
in[i] = i + i + 1;
/* Write a reduction loop to be reduced using vector shifts and folded. */
+#include "tree-vect.h"
+
extern void abort(void);
int
unsigned char i = 0;
unsigned char sum = 1;
+ check_vect ();
+
for (i = 0; i < 16; i++)
in[i] = i + i + 1;
/* Write a reduction loop to be reduced using vector shifts. */
+#include "tree-vect.h"
+
extern void abort(void);
unsigned char in[16] __attribute__((__aligned__(16)));
unsigned char i = 0;
unsigned char sum = 1;
+ check_vect ();
+
for (i = 0; i < 16; i++)
in[i] = (i + i + 1) & 0xfd;
/* Write a reduction loop to be reduced using vector shifts and folded. */
+#include "tree-vect.h"
+
extern void abort(void);
int
unsigned char i = 0;
unsigned char sum = 1;
+ check_vect ();
+
for (i = 0; i < 16; i++)
in[i] = (i + i + 1) & 0xfd;
int a[N];
short b[N];
+ check_vect ();
+
for (i = 0; i < N; i++)
{
a[i] = 0;
unsigned int a[N];
unsigned short b[N];
+ check_vect ();
+
for (i = 0; i < N; i++)
{
a[i] = 0;
{
int i;
+ check_vect ();
+
for (i = 0; i < N; i++)
{
in[i] = i;
{
int i;
+ check_vect ();
+
for (i = 0; i < N; i++)
{
in[i] = i;
-! { dg-do run }
! { dg-additional-options "-Ofast -fno-inline" }
subroutine check (a, b)