1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -ffast-math" } */
4 #include <stdint-gcc.h>
7 reduc_plus_int (int *__restrict a
, int n
)
10 for (int i
= 0; i
< n
; ++i
)
16 reduc_plus_float (float *__restrict a
, int n
)
19 for (int i
= 0; i
< n
; ++i
)
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 } } */