Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/widen/widen-10.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=rv32gcv_zvfh -mabi=ilp32d -mrvv-vector-bits=scalable -O3 -ffast-math -fno-vect-cost-model" } */
3
4 #include <stdint-gcc.h>
5
6 #define TEST_TYPE(TYPE1, TYPE2) \
7 __attribute__ ((noipa)) void vwmacc_##TYPE1_##TYPE2 (TYPE1 *__restrict dst, \
8 TYPE2 *__restrict a, \
9 TYPE2 *__restrict b, \
10 int n) \
11 { \
12 for (int i = 0; i < n; i++) \
13 dst[i] += -((TYPE1) a[i] * (TYPE1) b[i]); \
14 }
15
16 #define TEST_ALL() \
17 TEST_TYPE (float, _Float16) \
18 TEST_TYPE (double, float)
19
20 TEST_ALL ()
21
22 /* { dg-final { scan-assembler-times {\tvfwnmsac\.vv} 2 } } */