Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/base/scalar_move-10.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv -mabi=lp64d -O0" } */
3 /* { dg-final { check-function-bodies "**" "" } } */
4
5 #include "riscv_vector.h"
6
7 /*
8 ** foo1:
9 ** ...
10 ** vsetivli\tzero,0,e16,m1,t[au],m[au]
11 ** vmv.x.s\t[a-x0-9]+,v[0-9]+
12 ** ...
13 */
14 int16_t foo1 (void *base, size_t vl)
15 {
16 int16_t maxVal = __riscv_vmv_x_s_i16m1_i16 (__riscv_vle16_v_i16m1 (base, vl));
17 return maxVal;
18 }
19
20 /*
21 ** foo2:
22 ** ...
23 ** vsetivli\tzero,0,e32,m1,t[au],m[au]
24 ** vfmv.f.s\tf[a-x0-9]+,v[0-9]+
25 ** ...
26 */
27 float foo2 (void *base, size_t vl)
28 {
29 float maxVal = __riscv_vfmv_f_s_f32m1_f32 (__riscv_vle32_v_f32m1 (base, vl));
30 return maxVal;
31 }