| 1 |
/* { dg-do run { target { riscv_v } } } */ |
| 2 |
/* { dg-options "-O3 -mrvv-vector-bits=zvl" } */ |
| 3 |
|
| 4 |
#include <assert.h> |
| 5 |
#include "compress-1.c" |
| 6 |
|
| 7 |
int |
| 8 |
main (void) |
| 9 |
{ |
| 10 |
vnx4i test_1_x = {0, 1, 2, 4}; |
| 11 |
vnx4i test_1_y = {4, 5, 7, 8}; |
| 12 |
vnx4i test_1_except = {0, 2, 7, 8}; |
| 13 |
vnx4i test_1_real; |
| 14 |
test_1_real = test_1 (test_1_x, test_1_y); |
| 15 |
for (int i = 0; i < 4; i++) |
| 16 |
assert (test_1_real[i] == test_1_except[i]); |
| 17 |
|
| 18 |
vnx4ui test_2_x = {0, 1, 2, 4}; |
| 19 |
vnx4ui test_2_y = {4, 5, 6, 8}; |
| 20 |
vnx4ui test_2_except = {0, 2, 6, 8}; |
| 21 |
vnx4ui test_2_real; |
| 22 |
test_2_real = test_2 (test_2_x, test_2_y); |
| 23 |
for (int i = 0; i < 4; i++) |
| 24 |
assert (test_2_real[i] == test_2_except[i]); |
| 25 |
|
| 26 |
return 0; |
| 27 |
} |