| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-march=rv64gcv -mabi=lp64d -O3 -mrvv-vector-bits=zvl" } */ |
| 3 |
|
| 4 |
#include <stdint-gcc.h> |
| 5 |
|
| 6 |
typedef int8_t vnx4i __attribute__ ((vector_size (4))); |
| 7 |
typedef uint8_t vnx4ui __attribute__ ((vector_size (4))); |
| 8 |
|
| 9 |
#define MASK_4 0, 1, 0, 1 |
| 10 |
|
| 11 |
vnx4i __attribute__ ((noinline, noclone)) test_1 (vnx4i x, vnx4i y) |
| 12 |
{ |
| 13 |
return __builtin_shufflevector (x, y, MASK_4); |
| 14 |
} |
| 15 |
|
| 16 |
vnx4ui __attribute__ ((noinline, noclone)) test_2 (vnx4ui x, vnx4ui y) |
| 17 |
{ |
| 18 |
return __builtin_shufflevector (x, y, MASK_4); |
| 19 |
} |
| 20 |
|
| 21 |
/* { dg-final { scan-assembler-times {\tvrgather\.vi} 2 } } */ |