Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr111037-3.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mrvv-vector-bits=scalable -march=rv32gc_zve64f_zvfh -mabi=ilp32d -O3" } */
3 // PR113249
4 /* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */
5
6 #include "riscv_vector.h"
7
8 void foo(_Float16 y, int16_t z, int64_t *i64p)
9 {
10 vint64m1_t vx =__riscv_vle64_v_i64m1 (i64p, 1);
11 vx = __riscv_vadd_vv_i64m1 (vx, vx, 1);
12 vint16m1_t vz =__riscv_vmv_s_x_i16m1 (z, 1);
13 vfloat16m1_t vy =__riscv_vfmv_s_f_f16m1 (y, 1);
14 asm volatile ("# use %0 %1" : : "vr"(vx), "vr" (vy), "vr" (vz));
15 }
16
17 /* { dg-final { scan-assembler-times {vsetivli\s+zero,\s*1,\s*e64,\s*m1,\s*t[au],\s*m[au]} 1 } } */
18 /* { dg-final { scan-assembler-times {vsetivli\s+zero,\s*1,\s*e16,\s*m1,\s*t[au],\s*m[au]} 1 } } */