Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/autovec/vls-vlmax/compress_run-5.c

raw
1 /* { dg-do run { target { riscv_v } } } */
2 /* { dg-options "-O3 -mrvv-vector-bits=zvl" } */
3
4 #include <assert.h>
5 #include "compress-5.c"
6
7 int
8 main (void)
9 {
10 vnx64i test_1_x
11 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
12 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
13 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
14 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63};
15 vnx64i test_1_y
16 = {64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
17 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
18 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
19 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
20 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127};
21 vnx64i test_1_except
22 = {1, 2, 3, 5, 7, 9, 10, 11, 12, 14, 15, 17, 19, 21, 22, 23,
23 26, 28, 30, 31, 37, 38, 41, 46, 47, 53, 54, 55, 60, 61, 62, 63,
24 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
25 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107};
26 vnx64i test_1_real;
27 test_1_real = test_1 (test_1_x, test_1_y);
28 for (int i = 0; i < 64; i++)
29 assert (test_1_real[i] == test_1_except[i]);
30
31 vnx32i test_2_x
32 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
33 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
34 vnx32i test_2_y
35 = {32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
36 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63};
37 vnx32i test_2_except
38 = {4, 5, 6, 7, 9, 10, 12, 14, 18, 20, 22, 23, 25, 27, 28, 29,
39 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50};
40 vnx32i test_2_real;
41 test_2_real = test_2 (test_2_x, test_2_y);
42 for (int i = 0; i < 32; i++)
43 assert (test_2_real[i] == test_2_except[i]);
44
45 vnx16i test_3_x = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
46 vnx16i test_3_y
47 = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
48 vnx16i test_3_except
49 = {0, 2, 3, 8, 10, 11, 12, 14, 24, 25, 26, 27, 28, 29, 30, 31};
50 vnx16i test_3_real;
51 test_3_real = test_3 (test_3_x, test_3_y);
52 for (int i = 0; i < 16; i++)
53 assert (test_3_real[i] == test_3_except[i]);
54
55 vnx8i test_4_x = {0, 1, 2, 3, 4, 5, 6, 7};
56 vnx8i test_4_y = {8, 9, 10, 11, 12, 13, 14, 15};
57 vnx8i test_4_except = {0, 1, 5, 7, 11, 12, 13, 14};
58 vnx8i test_4_real;
59 test_4_real = test_4 (test_4_x, test_4_y);
60 for (int i = 0; i < 8; i++)
61 assert (test_4_real[i] == test_4_except[i]);
62
63 vnx64ui test_5_x
64 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
65 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
66 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
67 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63};
68 vnx64ui test_5_y
69 = {64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
70 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
71 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
72 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
73 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127};
74 vnx64ui test_5_except
75 = {1, 2, 3, 5, 7, 9, 10, 11, 12, 14, 15, 17, 19, 21, 22, 23,
76 26, 28, 30, 31, 37, 38, 41, 46, 47, 53, 54, 55, 60, 61, 62, 63,
77 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
78 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107};
79 vnx64ui test_5_real;
80 test_5_real = test_5 (test_5_x, test_5_y);
81 for (int i = 0; i < 64; i++)
82 assert (test_5_real[i] == test_5_except[i]);
83
84 vnx32ui test_6_x
85 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
86 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
87 vnx32ui test_6_y
88 = {32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
89 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63};
90 vnx32ui test_6_except
91 = {4, 5, 6, 7, 9, 10, 12, 14, 18, 20, 22, 23, 25, 27, 28, 29,
92 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50};
93 vnx32ui test_6_real;
94 test_6_real = test_6 (test_6_x, test_6_y);
95 for (int i = 0; i < 32; i++)
96 assert (test_6_real[i] == test_6_except[i]);
97
98 vnx16ui test_7_x = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
99 vnx16ui test_7_y
100 = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
101 vnx16ui test_7_except
102 = {0, 2, 3, 8, 10, 11, 12, 14, 24, 25, 26, 27, 28, 29, 30, 31};
103 vnx16ui test_7_real;
104 test_7_real = test_7 (test_7_x, test_7_y);
105 for (int i = 0; i < 16; i++)
106 assert (test_7_real[i] == test_7_except[i]);
107
108 vnx8ui test_8_x = {0, 1, 2, 3, 4, 5, 6, 7};
109 vnx8ui test_8_y = {8, 9, 10, 11, 12, 13, 14, 15};
110 vnx8ui test_8_except = {0, 1, 5, 7, 11, 12, 13, 14};
111 vnx8ui test_8_real;
112 test_8_real = test_8 (test_8_x, test_8_y);
113 for (int i = 0; i < 8; i++)
114 assert (test_8_real[i] == test_8_except[i]);
115
116 vnx32f test_9_x
117 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
118 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
119 vnx32f test_9_y
120 = {32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
121 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63};
122 vnx32f test_9_except
123 = {4, 5, 6, 7, 9, 10, 12, 14, 18, 20, 22, 23, 25, 27, 28, 29,
124 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50};
125 vnx32f test_9_real;
126 test_9_real = test_9 (test_9_x, test_9_y);
127 for (int i = 0; i < 32; i++)
128 assert (test_9_real[i] == test_9_except[i]);
129
130 vnx16f test_10_x = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
131 vnx16f test_10_y
132 = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
133 vnx16f test_10_except
134 = {0, 2, 3, 8, 10, 11, 12, 14, 24, 25, 26, 27, 28, 29, 30, 31};
135 vnx16f test_10_real;
136 test_10_real = test_10 (test_10_x, test_10_y);
137 for (int i = 0; i < 16; i++)
138 assert (test_10_real[i] == test_10_except[i]);
139
140 vnx8f test_11_x = {0, 1, 2, 3, 4, 5, 6, 7};
141 vnx8f test_11_y = {8, 9, 10, 11, 12, 13, 14, 15};
142 vnx8f test_11_except = {0, 1, 5, 7, 11, 12, 13, 14};
143 vnx8f test_11_real;
144 test_11_real = test_11 (test_11_x, test_11_y);
145 for (int i = 0; i < 8; i++)
146 assert (test_11_real[i] == test_11_except[i]);
147
148 return 0;
149 }