| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-mrvv-vector-bits=scalable -march=rv64gcv -mabi=lp64d" } */ |
| 3 |
|
| 4 |
#include "riscv_vector.h" |
| 5 |
|
| 6 |
void bar1 (int32_t a); |
| 7 |
|
| 8 |
int32_t |
| 9 |
foo1 () |
| 10 |
{ |
| 11 |
int32_t a = __riscv_vsetvl_e8mf8(19); |
| 12 |
bar1 (a); |
| 13 |
return a; |
| 14 |
} |
| 15 |
|
| 16 |
void bar2 (uint32_t a); |
| 17 |
|
| 18 |
uint32_t |
| 19 |
foo2 () |
| 20 |
{ |
| 21 |
uint32_t a = __riscv_vsetvl_e8mf8(19); |
| 22 |
bar2 (a); |
| 23 |
return a; |
| 24 |
} |
| 25 |
|
| 26 |
int32_t foo3 () |
| 27 |
{ |
| 28 |
return __riscv_vsetvl_e8mf8(19); |
| 29 |
} |
| 30 |
|
| 31 |
/* { dg-final { scan-assembler-not {sext\.w} { target { no-opts "-O0" "-g" } } } } */ |