gcc/testsuite/gcc.target/riscv/rvv/autovec/pr111232.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-march=rv64gcv -mabi=lp64d -mrvv-vector-bits=scalable -Ofast -fno-schedule-insns -fno-schedule-insns2" } */ |
| 3 | |
| 4 | #include <stdint-gcc.h> |
| 5 | |
| 6 | int16_t |
| 7 | foo (int8_t *restrict x, int8_t *restrict y, int n) |
| 8 | { |
| 9 | int16_t result = 0; |
| 10 | |
| 11 | for (int i = 0; i < n; i++) |
| 12 | { |
| 13 | result += (x[i] * y[i]); |
| 14 | } |
| 15 | return result; |
| 16 | } |
| 17 | |
| 18 | /* { dg-final { scan-assembler {\tvwmacc\.vv\tv[0-9]+,v[0-9]+,v[0-9]+} } } */ |