gcc/testsuite/gcc.target/riscv/rvv/vsetvl/wredsum_vlmax.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-mrvv-vector-bits=scalable -march=rv64gcv_zvl256b -mabi=lp64d -mrvv-vector-bits=zvl -O3" } */ |
| 3 | |
| 4 | |
| 5 | #include <stdint-gcc.h> |
| 6 | |
| 7 | int16_t foo (int8_t *restrict a) |
| 8 | { |
| 9 | int16_t sum = 0; |
| 10 | for (int i = 0; i < 8; i += 1) |
| 11 | sum += a[i]; |
| 12 | return sum; |
| 13 | } |
| 14 | |
| 15 | /* { dg-final { scan-assembler-not {\tvsetivli\tzero,16} } } */ |