| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-march=rv64gcv_zvfh -mabi=lp64 -O3" } */ |
| 3 |
/* { dg-additional-options "-fno-schedule-insns -fno-schedule-insns2" } */ |
| 4 |
|
| 5 |
#include "riscv_vector.h" |
| 6 |
|
| 7 |
vfloat16m2_t |
| 8 |
test_vcreate_v_f16m1_f16m2 (vfloat16m1_t v0, vfloat16m1_t v1) |
| 9 |
{ |
| 10 |
return __riscv_vcreate_v_f16m1_f16m2 (v0, v1); |
| 11 |
} |
| 12 |
|
| 13 |
vfloat32m2_t |
| 14 |
test_vcreate_v_f32m1_f32m2 (vfloat32m1_t v0, vfloat32m1_t v1) |
| 15 |
{ |
| 16 |
return __riscv_vcreate_v_f32m1_f32m2 (v0, v1); |
| 17 |
} |
| 18 |
|
| 19 |
vfloat64m4_t |
| 20 |
test_vcreate_v_f64m1_f64m4 (vfloat64m1_t v0, vfloat64m1_t v1, vfloat64m1_t v2, |
| 21 |
vfloat64m1_t v3) |
| 22 |
{ |
| 23 |
return __riscv_vcreate_v_f64m1_f64m4 (v0, v1, v2, v3); |
| 24 |
} |
| 25 |
|
| 26 |
vint8m2_t |
| 27 |
test_vcreate_v_i8m1_i8m2 (vint8m1_t v0, vint8m1_t v1) |
| 28 |
{ |
| 29 |
return __riscv_vcreate_v_i8m1_i8m2 (v0, v1); |
| 30 |
} |
| 31 |
|
| 32 |
vint16m8_t |
| 33 |
test_vcreate_v_i16m1_i16m8 (vint16m1_t v0, vint16m1_t v1, vint16m1_t v2, |
| 34 |
vint16m1_t v3, vint16m1_t v4, vint16m1_t v5, |
| 35 |
vint16m1_t v6, vint16m1_t v7) |
| 36 |
{ |
| 37 |
return __riscv_vcreate_v_i16m1_i16m8 (v0, v1, v2, v3, v4, v5, v6, v7); |
| 38 |
} |
| 39 |
|
| 40 |
vint32m4_t |
| 41 |
test_vcreate_v_i32m2_i32m4 (vint32m2_t v0, vint32m2_t v1) |
| 42 |
{ |
| 43 |
return __riscv_vcreate_v_i32m2_i32m4 (v0, v1); |
| 44 |
} |
| 45 |
|
| 46 |
vint64m8_t |
| 47 |
test_vcreate_v_i64m2_i64m8 (vint64m2_t v0, vint64m2_t v1, vint64m2_t v2, |
| 48 |
vint64m2_t v3) |
| 49 |
{ |
| 50 |
return __riscv_vcreate_v_i64m2_i64m8 (v0, v1, v2, v3); |
| 51 |
} |
| 52 |
|
| 53 |
vuint8m2_t |
| 54 |
test_vcreate_v_u8m1_u8m2 (vuint8m1_t v0, vuint8m1_t v1) |
| 55 |
{ |
| 56 |
return __riscv_vcreate_v_u8m1_u8m2 (v0, v1); |
| 57 |
} |
| 58 |
|
| 59 |
vuint16m8_t |
| 60 |
test_vcreate_v_u16m1_u16m8 (vuint16m1_t v0, vuint16m1_t v1, vuint16m1_t v2, |
| 61 |
vuint16m1_t v3, vuint16m1_t v4, vuint16m1_t v5, |
| 62 |
vuint16m1_t v6, vuint16m1_t v7) |
| 63 |
{ |
| 64 |
return __riscv_vcreate_v_u16m1_u16m8 (v0, v1, v2, v3, v4, v5, v6, v7); |
| 65 |
} |
| 66 |
|
| 67 |
vuint32m8_t |
| 68 |
test_vcreate_v_u32m2_u32m8 (vuint32m2_t v0, vuint32m2_t v1, vuint32m2_t v2, |
| 69 |
vuint32m2_t v3) |
| 70 |
{ |
| 71 |
return __riscv_vcreate_v_u32m2_u32m8 (v0, v1, v2, v3); |
| 72 |
} |
| 73 |
|
| 74 |
vuint64m4_t |
| 75 |
test_vcreate_v_u64m2_u64m4 (vuint64m2_t v0, vuint64m2_t v1) |
| 76 |
{ |
| 77 |
return __riscv_vcreate_v_u64m2_u64m4 (v0, v1); |
| 78 |
} |
| 79 |
|
| 80 |
vfloat16mf4x2_t |
| 81 |
test_vcreate_v_f16mf4x2 (vfloat16mf4_t v0, vfloat16mf4_t v1) |
| 82 |
{ |
| 83 |
return __riscv_vcreate_v_f16mf4x2 (v0, v1); |
| 84 |
} |
| 85 |
|
| 86 |
vfloat16mf4x3_t |
| 87 |
test_vcreate_v_f16mf4x3 (vfloat16mf4_t v0, vfloat16mf4_t v1, vfloat16mf4_t v2) |
| 88 |
{ |
| 89 |
return __riscv_vcreate_v_f16mf4x3 (v0, v1, v2); |
| 90 |
} |
| 91 |
|
| 92 |
vfloat16mf4x4_t |
| 93 |
test_vcreate_v_f16mf4x4 (vfloat16mf4_t v0, vfloat16mf4_t v1, vfloat16mf4_t v2, |
| 94 |
vfloat16mf4_t v3) |
| 95 |
{ |
| 96 |
return __riscv_vcreate_v_f16mf4x4 (v0, v1, v2, v3); |
| 97 |
} |
| 98 |
|
| 99 |
vfloat16mf4x5_t |
| 100 |
test_vcreate_v_f16mf4x5 (vfloat16mf4_t v0, vfloat16mf4_t v1, vfloat16mf4_t v2, |
| 101 |
vfloat16mf4_t v3, vfloat16mf4_t v4) |
| 102 |
{ |
| 103 |
return __riscv_vcreate_v_f16mf4x5 (v0, v1, v2, v3, v4); |
| 104 |
} |
| 105 |
|
| 106 |
vfloat16mf4x6_t |
| 107 |
test_vcreate_v_f16mf4x6 (vfloat16mf4_t v0, vfloat16mf4_t v1, vfloat16mf4_t v2, |
| 108 |
vfloat16mf4_t v3, vfloat16mf4_t v4, vfloat16mf4_t v5) |
| 109 |
{ |
| 110 |
return __riscv_vcreate_v_f16mf4x6 (v0, v1, v2, v3, v4, v5); |
| 111 |
} |
| 112 |
|
| 113 |
vfloat16mf4x7_t |
| 114 |
test_vcreate_v_f16mf4x7 (vfloat16mf4_t v0, vfloat16mf4_t v1, vfloat16mf4_t v2, |
| 115 |
vfloat16mf4_t v3, vfloat16mf4_t v4, vfloat16mf4_t v5, |
| 116 |
vfloat16mf4_t v6) |
| 117 |
{ |
| 118 |
return __riscv_vcreate_v_f16mf4x7 (v0, v1, v2, v3, v4, v5, v6); |
| 119 |
} |
| 120 |
|
| 121 |
vfloat16mf4x8_t |
| 122 |
test_vcreate_v_f16mf4x8 (vfloat16mf4_t v0, vfloat16mf4_t v1, vfloat16mf4_t v2, |
| 123 |
vfloat16mf4_t v3, vfloat16mf4_t v4, vfloat16mf4_t v5, |
| 124 |
vfloat16mf4_t v6, vfloat16mf4_t v7) |
| 125 |
{ |
| 126 |
return __riscv_vcreate_v_f16mf4x8 (v0, v1, v2, v3, v4, v5, v6, v7); |
| 127 |
} |
| 128 |
|
| 129 |
vfloat32m1x2_t |
| 130 |
test_vcreate_v_f32m1x2 (vfloat32m1_t v0, vfloat32m1_t v1) |
| 131 |
{ |
| 132 |
return __riscv_vcreate_v_f32m1x2 (v0, v1); |
| 133 |
} |
| 134 |
|
| 135 |
vfloat32m1x3_t |
| 136 |
test_vcreate_v_f32m1x3 (vfloat32m1_t v0, vfloat32m1_t v1, vfloat32m1_t v2) |
| 137 |
{ |
| 138 |
return __riscv_vcreate_v_f32m1x3 (v0, v1, v2); |
| 139 |
} |
| 140 |
|
| 141 |
vfloat32m1x4_t |
| 142 |
test_vcreate_v_f32m1x4 (vfloat32m1_t v0, vfloat32m1_t v1, vfloat32m1_t v2, |
| 143 |
vfloat32m1_t v3) |
| 144 |
{ |
| 145 |
return __riscv_vcreate_v_f32m1x4 (v0, v1, v2, v3); |
| 146 |
} |
| 147 |
|
| 148 |
vfloat32m1x5_t |
| 149 |
test_vcreate_v_f32m1x5 (vfloat32m1_t v0, vfloat32m1_t v1, vfloat32m1_t v2, |
| 150 |
vfloat32m1_t v3, vfloat32m1_t v4) |
| 151 |
{ |
| 152 |
return __riscv_vcreate_v_f32m1x5 (v0, v1, v2, v3, v4); |
| 153 |
} |
| 154 |
|
| 155 |
vfloat32m1x6_t |
| 156 |
test_vcreate_v_f32m1x6 (vfloat32m1_t v0, vfloat32m1_t v1, vfloat32m1_t v2, |
| 157 |
vfloat32m1_t v3, vfloat32m1_t v4, vfloat32m1_t v5) |
| 158 |
{ |
| 159 |
return __riscv_vcreate_v_f32m1x6 (v0, v1, v2, v3, v4, v5); |
| 160 |
} |
| 161 |
|
| 162 |
vfloat32m1x7_t |
| 163 |
test_vcreate_v_f32m1x7 (vfloat32m1_t v0, vfloat32m1_t v1, vfloat32m1_t v2, |
| 164 |
vfloat32m1_t v3, vfloat32m1_t v4, vfloat32m1_t v5, |
| 165 |
vfloat32m1_t v6) |
| 166 |
{ |
| 167 |
return __riscv_vcreate_v_f32m1x7 (v0, v1, v2, v3, v4, v5, v6); |
| 168 |
} |
| 169 |
|
| 170 |
vfloat32m1x8_t |
| 171 |
test_vcreate_v_f32m1x8 (vfloat32m1_t v0, vfloat32m1_t v1, vfloat32m1_t v2, |
| 172 |
vfloat32m1_t v3, vfloat32m1_t v4, vfloat32m1_t v5, |
| 173 |
vfloat32m1_t v6, vfloat32m1_t v7) |
| 174 |
{ |
| 175 |
return __riscv_vcreate_v_f32m1x8 (v0, v1, v2, v3, v4, v5, v6, v7); |
| 176 |
} |
| 177 |
|
| 178 |
vfloat64m2x2_t |
| 179 |
test_vcreate_v_f64m2x2 (vfloat64m2_t v0, vfloat64m2_t v1) |
| 180 |
{ |
| 181 |
return __riscv_vcreate_v_f64m2x2 (v0, v1); |
| 182 |
} |
| 183 |
|
| 184 |
vfloat64m2x3_t |
| 185 |
test_vcreate_v_f64m2x3 (vfloat64m2_t v0, vfloat64m2_t v1, vfloat64m2_t v2) |
| 186 |
{ |
| 187 |
return __riscv_vcreate_v_f64m2x3 (v0, v1, v2); |
| 188 |
} |
| 189 |
|
| 190 |
vfloat64m2x4_t |
| 191 |
test_vcreate_v_f64m2x4 (vfloat64m2_t v0, vfloat64m2_t v1, vfloat64m2_t v2, |
| 192 |
vfloat64m2_t v3) |
| 193 |
{ |
| 194 |
return __riscv_vcreate_v_f64m2x4 (v0, v1, v2, v3); |
| 195 |
} |
| 196 |
|
| 197 |
vfloat64m4x2_t |
| 198 |
test_vcreate_v_f64m4x2 (vfloat64m4_t v0, vfloat64m4_t v1) |
| 199 |
{ |
| 200 |
return __riscv_vcreate_v_f64m4x2 (v0, v1); |
| 201 |
} |
| 202 |
|
| 203 |
vint8m2x2_t |
| 204 |
test_vcreate_v_i8m2x2 (vint8m2_t v0, vint8m2_t v1) |
| 205 |
{ |
| 206 |
return __riscv_vcreate_v_i8m2x2 (v0, v1); |
| 207 |
} |
| 208 |
|
| 209 |
vint8m2x3_t |
| 210 |
test_vcreate_v_i8m2x3 (vint8m2_t v0, vint8m2_t v1, vint8m2_t v2) |
| 211 |
{ |
| 212 |
return __riscv_vcreate_v_i8m2x3 (v0, v1, v2); |
| 213 |
} |
| 214 |
|
| 215 |
vint8m2x4_t |
| 216 |
test_vcreate_v_i8m2x4 (vint8m2_t v0, vint8m2_t v1, vint8m2_t v2, vint8m2_t v3) |
| 217 |
{ |
| 218 |
return __riscv_vcreate_v_i8m2x4 (v0, v1, v2, v3); |
| 219 |
} |
| 220 |
|
| 221 |
vint8m4x2_t |
| 222 |
test_vcreate_v_i8m4x2 (vint8m4_t v0, vint8m4_t v1) |
| 223 |
{ |
| 224 |
return __riscv_vcreate_v_i8m4x2 (v0, v1); |
| 225 |
} |
| 226 |
|
| 227 |
vint16m4x2_t |
| 228 |
test_vcreate_v_i16m4x2 (vint16m4_t v0, vint16m4_t v1) |
| 229 |
{ |
| 230 |
return __riscv_vcreate_v_i16m4x2 (v0, v1); |
| 231 |
} |
| 232 |
|
| 233 |
vint32m4x2_t |
| 234 |
test_vcreate_v_i32m4x2 (vint32m4_t v0, vint32m4_t v1) |
| 235 |
{ |
| 236 |
return __riscv_vcreate_v_i32m4x2 (v0, v1); |
| 237 |
} |
| 238 |
|
| 239 |
vint64m2x2_t |
| 240 |
test_vcreate_v_i64m2x2 (vint64m2_t v0, vint64m2_t v1) |
| 241 |
{ |
| 242 |
return __riscv_vcreate_v_i64m2x2 (v0, v1); |
| 243 |
} |
| 244 |
|
| 245 |
vint64m2x3_t |
| 246 |
test_vcreate_v_i64m2x3 (vint64m2_t v0, vint64m2_t v1, vint64m2_t v2) |
| 247 |
{ |
| 248 |
return __riscv_vcreate_v_i64m2x3 (v0, v1, v2); |
| 249 |
} |
| 250 |
|
| 251 |
vint64m2x4_t |
| 252 |
test_vcreate_v_i64m2x4 (vint64m2_t v0, vint64m2_t v1, vint64m2_t v2, |
| 253 |
vint64m2_t v3) |
| 254 |
{ |
| 255 |
return __riscv_vcreate_v_i64m2x4 (v0, v1, v2, v3); |
| 256 |
} |
| 257 |
|
| 258 |
// Ideally with O3, should find 0 instances of any vmvnr.v PR113913 |
| 259 |
/* { dg-final { scan-assembler-not {vmv1r.v\s+v[0-9]+,\s*v[0-9]+} } } */ |
| 260 |
/* { dg-final { scan-assembler-not {vmv2r.v\s+v[0-9]+,\s*v[0-9]+} } } */ |
| 261 |
/* { dg-final { scan-assembler-not {vmv4r.v\s+v[0-9]+,\s*v[0-9]+} } } */ |