| 1 |
/* Test there is no ICE when compile. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-march=rv64gcv_zvfhmin -mrvv-vector-bits=zvl -mabi=lp64d -O3 -ftree-vectorize" } */ |
| 4 |
|
| 5 |
#include <assert.h> |
| 6 |
#include <stdint-gcc.h> |
| 7 |
|
| 8 |
typedef _Float16 vnx4f __attribute__ ((vector_size (8))); |
| 9 |
|
| 10 |
vnx4f __attribute__ ((noinline, noclone)) |
| 11 |
test_5 (vnx4f x, vnx4f y) |
| 12 |
{ |
| 13 |
return __builtin_shufflevector (x, y, 1, 3, 6, 7); |
| 14 |
} |
| 15 |
|
| 16 |
int |
| 17 |
main (void) |
| 18 |
{ |
| 19 |
vnx4f test_5_x = {0, 1, 3, 4}; |
| 20 |
vnx4f test_5_y = {4, 5, 6, 7}; |
| 21 |
vnx4f test_5_except = {1, 4, 6, 7}; |
| 22 |
vnx4f test_5_real; |
| 23 |
test_5_real = test_5 (test_5_x, test_5_y); |
| 24 |
|
| 25 |
for (int i = 0; i < 4; i++) |
| 26 |
assert (test_5_real[i] == test_5_except[i]); |
| 27 |
|
| 28 |
return 0; |
| 29 |
} |
| 30 |
|
| 31 |
/* { dg-final { scan-assembler-times {call\s+__extendhfsf2} 8 } } */ |