gcc/testsuite/gcc.target/s390/vector/reverse-elements-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O3 -mzarch -march=z14" } */ |
| 3 | /* { dg-require-effective-target s390_vxe } */ |
| 4 | /* { dg-final { scan-assembler-times {\tvpdi\t} 1 } } */ |
| 5 | /* { dg-final { scan-assembler-not {\tvperm\t} } } */ |
| 6 | |
| 7 | typedef float __attribute__ ((vector_size (16))) V4SF; |
| 8 | |
| 9 | V4SF |
| 10 | v4sf (V4SF x) |
| 11 | { |
| 12 | V4SF y; |
| 13 | for (int i = 0; i < 4; ++i) |
| 14 | y[i] = x[3 - i]; |
| 15 | return y; |
| 16 | } |