install: Drop hppa*-hp-hpux10, remove old notes on hppa*-hp-hpux11
[official-gcc.git] / gcc / testsuite / gcc.target / riscv / rvv / base / pr112432-42.c
blob1ee5b20a899d3f81b7f719339a54f5fbde119f8e
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -ffast-math" } */
4 #include <stdint-gcc.h>
6 int64_t
7 reduc_plus_int (int *__restrict a, int n)
9 int64_t r = 0;
10 for (int i = 0; i < n; ++i)
11 r += a[i];
12 return r;
15 double
16 reduc_plus_float (float *__restrict a, int n)
18 double r = 0;
19 for (int i = 0; i < n; ++i)
20 r += a[i];
21 return r;
24 /* { dg-final { scan-assembler-not {vmv1r} } } */
25 /* { dg-final { scan-assembler-not {vmv2r} } } */
26 /* { dg-final { scan-assembler-not {vmv4r} } } */
27 /* { dg-final { scan-assembler-not {vmv8r} } } */
28 /* { dg-final { scan-assembler-not {csrr} } } */
29 /* { dg-final { scan-assembler-times {vwadd\.wv} 1 } } */
30 /* { dg-final { scan-assembler-times {vfwadd\.wv} 1 } } */