gcc/testsuite/gcc.target/i386/vect-pr97352.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O3 -mavx -mno-avx2 -mno-avx512f" } */ |
| 3 | |
| 4 | double x[2], a[4], b[4], c[5]; |
| 5 | |
| 6 | void foo () |
| 7 | { |
| 8 | a[0] = c[0]; |
| 9 | a[1] = c[1]; |
| 10 | a[2] = c[0]; |
| 11 | a[3] = c[1]; |
| 12 | b[0] = c[2]; |
| 13 | b[1] = c[3]; |
| 14 | b[2] = c[2]; |
| 15 | b[3] = c[3]; |
| 16 | x[0] = c[4]; |
| 17 | x[1] = c[4]; |
| 18 | } |
| 19 | |
| 20 | /* We should vectorize all three stores and the load from c apart |
| 21 | from c[4] which should be duped. */ |
| 22 | /* { dg-final { scan-assembler-times "vmov.pd" 4 } } */ |