Stop only if there aren't any usable algorithms
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / warn-vect-op-2.c
blob6e631192445681fb61bfd9e3aa12c62a18aa246b
1 /* { dg-do compile { target { ! { ia32 } } } } */
2 /* { dg-options "-mno-sse -Wvector-operation-performance" } */
3 #define vector(elcount, type) \
4 __attribute__((vector_size((elcount)*sizeof(type)))) type
6 int main (int argc, char *argv[])
8 vector (16, signed char) v0 = {argc, 1, 15, 38, 12, -1, argc, 2,
9 argc, 1, 15, 38, 12, -1, argc, 2};
10 vector (16, signed char) v1 = {-4, argc, 2, 11, 1, 17, -8, argc,
11 argc, 1, 15, 38, 12, -1, argc, 2};
12 vector (16, signed char) res[] =
14 v0 + v1, /* { dg-warning "expanded in parallel" } */
15 v0 - v1, /* { dg-warning "expanded in parallel" } */
16 v0 > v1, /* { dg-warning "expanded piecewise" } */
17 v0 & v1, /* { dg-warning "expanded in parallel" } */
18 __builtin_shuffle (v0, v1), /* { dg-warning "expanded piecewise" } */
19 __builtin_shuffle (v0, v1, v1) /* { dg-warning "expanded piecewise" } */
22 return res[argc][argc];