| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O3 -march=rv32gcv -mabi=ilp32d" } */ |
| 3 |
|
| 4 |
#include "riscv_vector.h" |
| 5 |
|
| 6 |
void |
| 7 |
f_vint16m2x2_t (void *base, void *out) |
| 8 |
{ |
| 9 |
vint16m2x2_t v = *(vint16m2x2_t*)base; |
| 10 |
*(vint16m2x2_t*)out = v; |
| 11 |
} |
| 12 |
|
| 13 |
void |
| 14 |
f_vuint16m2x2_t (void *base, void *out) |
| 15 |
{ |
| 16 |
vuint16m2x2_t v = *(vuint16m2x2_t*)base; |
| 17 |
*(vuint16m2x2_t*)out = v; |
| 18 |
} |
| 19 |
|
| 20 |
void |
| 21 |
f_vint16m2x3_t (void *base, void *out) |
| 22 |
{ |
| 23 |
vint16m2x3_t v = *(vint16m2x3_t*)base; |
| 24 |
*(vint16m2x3_t*)out = v; |
| 25 |
} |
| 26 |
|
| 27 |
void |
| 28 |
f_vuint16m2x3_t (void *base, void *out) |
| 29 |
{ |
| 30 |
vuint16m2x3_t v = *(vuint16m2x3_t*)base; |
| 31 |
*(vuint16m2x3_t*)out = v; |
| 32 |
} |
| 33 |
|
| 34 |
void |
| 35 |
f_vint16m2x4_t (void *base, void *out) |
| 36 |
{ |
| 37 |
vint16m2x4_t v = *(vint16m2x4_t*)base; |
| 38 |
*(vint16m2x4_t*)out = v; |
| 39 |
} |
| 40 |
|
| 41 |
void |
| 42 |
f_vuint16m2x4_t (void *base, void *out) |
| 43 |
{ |
| 44 |
vuint16m2x4_t v = *(vuint16m2x4_t*)base; |
| 45 |
*(vuint16m2x4_t*)out = v; |
| 46 |
} |
| 47 |
|
| 48 |
/* { dg-final { scan-assembler-not {srai} } } */ |
| 49 |
/* { dg-final { scan-assembler {slli} } } */ |
| 50 |
/* { dg-final { scan-assembler-times {vl2re16\.v\tv[0-9]+,0\([a-x0-9]+\)} 18 } } */ |
| 51 |
/* { dg-final { scan-assembler-times {vs2r\.v\tv[0-9]+,0\([a-x0-9]+\)} 18 } } */ |