Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/base/pr110943.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -march=rv64gcv -mabi=lp64d" } */
3 /* { dg-final { check-function-bodies "**" "" } } */
4
5 #include "riscv_vector.h"
6
7 /*
8 ** foo9:
9 ** vsetivli\tzero,1,e64,m2,t[au],m[au]
10 ** ...
11 ** vs2r.v\tv[0-9]+,0\([a-x0-9]+\)
12 ** ret
13 */
14 void foo9 (void *base, void *out, size_t vl)
15 {
16 int64_t scalar = *(int64_t*)(base + 100);
17 vint64m2_t v = __riscv_vmv_v_x_i64m2 (0, 1);
18 *(vint64m2_t*)out = v;
19 }
20
21 /*
22 ** foo10:
23 ** vsetivli\tzero,1,e64,m2,t[au],m[au]
24 ** ...
25 ** vs2r.v\tv[0-9]+,0\([a-x0-9]+\)
26 ** ret
27 */
28 void foo10 (void *base, void *out, size_t vl)
29 {
30 int64_t scalar = *(int64_t*)(base + 100);
31 vint64m2_t v = __riscv_vmv_s_x_i64m2 (0, 1);
32 *(vint64m2_t*)out = v;
33 }