Debian Codegraph @

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

raw
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv_zvfh -mabi=lp64d -O1" } */
3
4 #include "riscv_vector.h"
5 _Float16 a[10];
6 void func(){
7 int placeholder0 = 10;
8 _Float16* ptr_a = a;
9 for (size_t vl; placeholder0 > 0; placeholder0 -= vl){
10 vl = __riscv_vsetvl_e16m1(placeholder0);
11 vfloat16mf2_t va = __riscv_vle16_v_f16mf2(ptr_a, vl);
12 vfloat16m1_t vb = __riscv_vlmul_ext_v_f16mf2_f16m1(va);
13 vfloat16mf2_t vc = __riscv_vlmul_trunc_v_f16m1_f16mf2(vb);
14 ptr_a += vl;
15 }
16 }