| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-march=rv64gcv_zvfhmin -mabi=lp64 -O3" } */ |
| 3 |
|
| 4 |
#include "riscv_vector.h" |
| 5 |
|
| 6 |
typedef _Float16 float16_t; |
| 7 |
|
| 8 |
vfloat16mf4_t test_vfncvt_f_f_w_f16mf4(vfloat32mf2_t src, size_t vl) { |
| 9 |
return __riscv_vfncvt_f_f_w_f16mf4(src, vl); |
| 10 |
} |
| 11 |
|
| 12 |
vfloat16mf2_t test_vfncvt_f_f_w_f16mf2(vfloat32m1_t src, size_t vl) { |
| 13 |
return __riscv_vfncvt_f_f_w_f16mf2(src, vl); |
| 14 |
} |
| 15 |
|
| 16 |
vfloat16m1_t test_vfncvt_f_f_w_f16m1(vfloat32m2_t src, size_t vl) { |
| 17 |
return __riscv_vfncvt_f_f_w_f16m1(src, vl); |
| 18 |
} |
| 19 |
|
| 20 |
vfloat16m2_t test_vfncvt_f_f_w_f16m2(vfloat32m4_t src, size_t vl) { |
| 21 |
return __riscv_vfncvt_f_f_w_f16m2(src, vl); |
| 22 |
} |
| 23 |
|
| 24 |
vfloat16m4_t test_vfncvt_f_f_w_f16m4(vfloat32m8_t src, size_t vl) { |
| 25 |
return __riscv_vfncvt_f_f_w_f16m4(src, vl); |
| 26 |
} |
| 27 |
|
| 28 |
vfloat32mf2_t test_vfwcvt_f_f_v_f32mf2(vfloat16mf4_t src, size_t vl) { |
| 29 |
return __riscv_vfwcvt_f_f_v_f32mf2(src, vl); |
| 30 |
} |
| 31 |
|
| 32 |
vfloat32m1_t test_vfwcvt_f_f_v_f32m1(vfloat16mf2_t src, size_t vl) { |
| 33 |
return __riscv_vfwcvt_f_f_v_f32m1(src, vl); |
| 34 |
} |
| 35 |
|
| 36 |
vfloat32m2_t test_vfwcvt_f_f_v_f32m2(vfloat16m1_t src, size_t vl) { |
| 37 |
return __riscv_vfwcvt_f_f_v_f32m2(src, vl); |
| 38 |
} |
| 39 |
|
| 40 |
vfloat32m4_t test_vfwcvt_f_f_v_f32m4(vfloat16m2_t src, size_t vl) { |
| 41 |
return __riscv_vfwcvt_f_f_v_f32m4(src, vl); |
| 42 |
} |
| 43 |
|
| 44 |
vfloat32m8_t test_vfwcvt_f_f_v_f32m8(vfloat16m4_t src, size_t vl) { |
| 45 |
return __riscv_vfwcvt_f_f_v_f32m8(src, vl); |
| 46 |
} |
| 47 |
|
| 48 |
vfloat16mf4_t test_vle16_v_f16mf4(const float16_t *base, size_t vl) { |
| 49 |
return __riscv_vle16_v_f16mf4(base, vl); |
| 50 |
} |
| 51 |
|
| 52 |
vfloat16m8_t test_vle16_v_f16m8(const float16_t *base, size_t vl) { |
| 53 |
return __riscv_vle16_v_f16m8(base, vl); |
| 54 |
} |
| 55 |
|
| 56 |
vfloat16mf4_t test_vreinterpret_v_i16mf4_f16mf4(vint16mf4_t src) { |
| 57 |
return __riscv_vreinterpret_v_i16mf4_f16mf4(src); |
| 58 |
} |
| 59 |
|
| 60 |
vfloat16m8_t test_vreinterpret_v_i16m8_f16m8(vint16m8_t src) { |
| 61 |
return __riscv_vreinterpret_v_i16m8_f16m8(src); |
| 62 |
} |
| 63 |
|
| 64 |
vfloat16mf4_t test_vreinterpret_v_u16mf4_f16mf4(vuint16mf4_t src) { |
| 65 |
return __riscv_vreinterpret_v_u16mf4_f16mf4(src); |
| 66 |
} |
| 67 |
|
| 68 |
vfloat16m8_t test_vreinterpret_v_u16m8_f16m8(vuint16m8_t src) { |
| 69 |
return __riscv_vreinterpret_v_u16m8_f16m8(src); |
| 70 |
} |
| 71 |
|
| 72 |
vint16mf4_t test_vreinterpret_v_f16mf4_i16mf4(vfloat16mf4_t src) { |
| 73 |
return __riscv_vreinterpret_v_f16mf4_i16mf4(src); |
| 74 |
} |
| 75 |
|
| 76 |
vint16m8_t test_vreinterpret_v_f16m8_i16m8(vfloat16m8_t src) { |
| 77 |
return __riscv_vreinterpret_v_f16m8_i16m8(src); |
| 78 |
} |
| 79 |
|
| 80 |
vuint16mf4_t test_vreinterpret_v_f16mf4_u16mf4(vfloat16mf4_t src) { |
| 81 |
return __riscv_vreinterpret_v_f16mf4_u16mf4(src); |
| 82 |
} |
| 83 |
|
| 84 |
vuint16m8_t test_vreinterpret_v_f16m8_u16m8(vfloat16m8_t src) { |
| 85 |
return __riscv_vreinterpret_v_f16m8_u16m8(src); |
| 86 |
} |
| 87 |
|
| 88 |
vfloat16mf2_t test_vlmul_ext_v_f16mf4_f16mf2(vfloat16mf4_t op1) { |
| 89 |
return __riscv_vlmul_ext_v_f16mf4_f16mf2(op1); |
| 90 |
} |
| 91 |
|
| 92 |
vfloat16m8_t test_vlmul_ext_v_f16m4_f16m8(vfloat16m4_t op1) { |
| 93 |
return __riscv_vlmul_ext_v_f16m4_f16m8(op1); |
| 94 |
} |
| 95 |
|
| 96 |
vfloat16m1_t test_vlmul_ext_v_f16mf4_f16m1(vfloat16mf4_t op1) { |
| 97 |
return __riscv_vlmul_ext_v_f16mf4_f16m1(op1); |
| 98 |
} |
| 99 |
|
| 100 |
vfloat16m8_t test_vlmul_ext_v_f16m2_f16m8(vfloat16m2_t op1) { |
| 101 |
return __riscv_vlmul_ext_v_f16m2_f16m8(op1); |
| 102 |
} |
| 103 |
|
| 104 |
vfloat16m2_t test_vlmul_ext_v_f16mf4_f16m2(vfloat16mf4_t op1) { |
| 105 |
return __riscv_vlmul_ext_v_f16mf4_f16m2(op1); |
| 106 |
} |
| 107 |
|
| 108 |
vfloat16m8_t test_vlmul_ext_v_f16m1_f16m8(vfloat16m1_t op1) { |
| 109 |
return __riscv_vlmul_ext_v_f16m1_f16m8(op1); |
| 110 |
} |
| 111 |
|
| 112 |
vfloat16m4_t test_vlmul_ext_v_f16mf4_f16m4(vfloat16mf4_t op1) { |
| 113 |
return __riscv_vlmul_ext_v_f16mf4_f16m4(op1); |
| 114 |
} |
| 115 |
|
| 116 |
vfloat16m8_t test_vlmul_ext_v_f16mf2_f16m8(vfloat16mf2_t op1) { |
| 117 |
return __riscv_vlmul_ext_v_f16mf2_f16m8(op1); |
| 118 |
} |
| 119 |
|
| 120 |
vfloat16m8_t test_vlmul_ext_v_f16mf4_f16m8(vfloat16mf4_t op1) { |
| 121 |
return __riscv_vlmul_ext_v_f16mf4_f16m8(op1); |
| 122 |
} |
| 123 |
|
| 124 |
vfloat16mf4_t test_vlmul_trunc_v_f16mf2_f16mf4(vfloat16mf2_t op1) { |
| 125 |
return __riscv_vlmul_trunc_v_f16mf2_f16mf4(op1); |
| 126 |
} |
| 127 |
|
| 128 |
vfloat16mf4_t test_vlmul_trunc_v_f16m1_f16mf4(vfloat16m1_t op1) { |
| 129 |
return __riscv_vlmul_trunc_v_f16m1_f16mf4(op1); |
| 130 |
} |
| 131 |
|
| 132 |
vfloat16mf2_t test_vlmul_trunc_v_f16m1_f16mf2(vfloat16m1_t op1) { |
| 133 |
return __riscv_vlmul_trunc_v_f16m1_f16mf2(op1); |
| 134 |
} |
| 135 |
|
| 136 |
vfloat16mf4_t test_vlmul_trunc_v_f16m2_f16mf4(vfloat16m2_t op1) { |
| 137 |
return __riscv_vlmul_trunc_v_f16m2_f16mf4(op1); |
| 138 |
} |
| 139 |
|
| 140 |
vfloat16m1_t test_vlmul_trunc_v_f16m2_f16m1(vfloat16m2_t op1) { |
| 141 |
return __riscv_vlmul_trunc_v_f16m2_f16m1(op1); |
| 142 |
} |
| 143 |
|
| 144 |
vfloat16mf4_t test_vlmul_trunc_v_f16m4_f16mf4(vfloat16m4_t op1) { |
| 145 |
return __riscv_vlmul_trunc_v_f16m4_f16mf4(op1); |
| 146 |
} |
| 147 |
|
| 148 |
vfloat16m2_t test_vlmul_trunc_v_f16m4_f16m2(vfloat16m4_t op1) { |
| 149 |
return __riscv_vlmul_trunc_v_f16m4_f16m2(op1); |
| 150 |
} |
| 151 |
|
| 152 |
vfloat16mf4_t test_vlmul_trunc_v_f16m8_f16mf4(vfloat16m8_t op1) { |
| 153 |
return __riscv_vlmul_trunc_v_f16m8_f16mf4(op1); |
| 154 |
} |
| 155 |
|
| 156 |
vfloat16m4_t test_vlmul_trunc_v_f16m8_f16m4(vfloat16m8_t op1) { |
| 157 |
return __riscv_vlmul_trunc_v_f16m8_f16m4(op1); |
| 158 |
} |
| 159 |
|
| 160 |
vfloat16mf4_t test_vundefined_f16mf4() { |
| 161 |
return __riscv_vundefined_f16mf4(); |
| 162 |
} |
| 163 |
|
| 164 |
vfloat16m8_t test_vundefined_f16m8() { |
| 165 |
return __riscv_vundefined_f16m8(); |
| 166 |
} |
| 167 |
|
| 168 |
vfloat16m2_t test_vset_v_f16m1_f16m2(vfloat16m2_t dest, size_t index, vfloat16m1_t val) { |
| 169 |
return __riscv_vset_v_f16m1_f16m2(dest, 0, val); |
| 170 |
} |
| 171 |
|
| 172 |
vfloat16m8_t test_vset_v_f16m4_f16m8(vfloat16m8_t dest, size_t index, vfloat16m4_t val) { |
| 173 |
return __riscv_vset_v_f16m4_f16m8(dest, 0, val); |
| 174 |
} |
| 175 |
|
| 176 |
vfloat16m1_t test_vget_v_f16m2_f16m1(vfloat16m2_t src, size_t index) { |
| 177 |
return __riscv_vget_v_f16m2_f16m1(src, 0); |
| 178 |
} |
| 179 |
|
| 180 |
vfloat16m4_t test_vget_v_f16m8_f16m4(vfloat16m8_t src, size_t index) { |
| 181 |
return __riscv_vget_v_f16m8_f16m4(src, 0); |
| 182 |
} |
| 183 |
|
| 184 |
/* { dg-final { scan-assembler-times {vsetvli\s+zero,\s*[a-x0-9]+,\s*e16,\s*mf4,\s*t[au],\s*m[au]} 3 } } */ |
| 185 |
/* { dg-final { scan-assembler-times {vsetvli\s+zero,\s*[a-x0-9]+,\s*e16,\s*mf2,\s*t[au],\s*m[au]} 2 } } */ |
| 186 |
/* { dg-final { scan-assembler-times {vsetvli\s+zero,\s*[a-x0-9]+,\s*e16,\s*m1,\s*t[au],\s*m[au]} 2 } } */ |
| 187 |
/* { dg-final { scan-assembler-times {vsetvli\s+zero,\s*[a-x0-9]+,\s*e16,\s*m2,\s*t[au],\s*m[au]} 2 } } */ |
| 188 |
/* { dg-final { scan-assembler-times {vsetvli\s+zero,\s*[a-x0-9]+,\s*e16,\s*m4,\s*t[au],\s*m[au]} 2 } } */ |
| 189 |
/* { dg-final { scan-assembler-times {vsetvli\s+zero,\s*[a-x0-9]+,\s*e16,\s*m8,\s*t[au],\s*m[au]} 1 } } */ |
| 190 |
/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e16,\s*m2,\s*t[au],\s*m[au]} 1 } } */ |
| 191 |
/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e16,\s*m4,\s*t[au],\s*m[au]} 1 } } */ |
| 192 |
/* { dg-final { scan-assembler-times {vsetvli\s+[a-x0-9]+,\s*zero,\s*e16,\s*m8,\s*t[au],\s*m[au]} 5 } } */ |
| 193 |
/* { dg-final { scan-assembler-times {vfwcvt\.f\.f\.v\s+v[0-9]+,\s*v[0-9]+} 5 } } */ |
| 194 |
/* { dg-final { scan-assembler-times {vfncvt\.f\.f\.w\s+v[0-9]+,\s*v[0-9]+} 5 } } */ |
| 195 |
/* { dg-final { scan-assembler-times {vle16\.v\s+v[0-9]+,\s*0\([a-x][0-9]+\)} 2 } } */ |