gcc/testsuite/gcc.target/riscv/rvv/autovec/scalable-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-march=rv32gc_zve64d -mabi=ilp32 -O3 -fno-vect-cost-model -mrvv-vector-bits=scalable -fdump-tree-vect-details" } */ |
| 3 | |
| 4 | #include "riscv_vector.h" |
| 5 | |
| 6 | void |
| 7 | f (int32_t *__restrict f, int32_t *__restrict d, int n) |
| 8 | { |
| 9 | for (int i = 0; i < n; ++i) |
| 10 | { |
| 11 | f[i * 2 + 0] = 1; |
| 12 | f[i * 2 + 1] = 2; |
| 13 | d[i] = 3; |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | /* { dg-final { scan-tree-dump-times "vectorized 1 loops in function" 1 "vect" } } */ |