Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvfclass_s.c

raw
1 /* { dg-options "-mlasx -w -fno-strict-aliasing" } */
2 /* { dg-timeout 500 } */
3 #include "../simd_correctness_check.h"
4 #include <lasxintrin.h>
5
6 int
7 main ()
8 {
9 __m256i __m256i_op0, __m256i_op1, __m256i_op2, __m256i_out, __m256i_result;
10 __m256 __m256_op0, __m256_op1, __m256_op2, __m256_out, __m256_result;
11 __m256d __m256d_op0, __m256d_op1, __m256d_op2, __m256d_out, __m256d_result;
12
13 int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail;
14 long int long_op0, long_op1, long_op2, lont_out, lont_result;
15 long int long_int_out, long_int_result;
16 unsigned int unsigned_int_out, unsigned_int_result;
17
18 *((int *)&__m256_op0[7]) = 0xfffffff8;
19 *((int *)&__m256_op0[6]) = 0xffffff08;
20 *((int *)&__m256_op0[5]) = 0x00ff00f8;
21 *((int *)&__m256_op0[4]) = 0x00ffcff8;
22 *((int *)&__m256_op0[3]) = 0xfffffff8;
23 *((int *)&__m256_op0[2]) = 0xffffff08;
24 *((int *)&__m256_op0[1]) = 0x00ff00f8;
25 *((int *)&__m256_op0[0]) = 0x00ffcff8;
26 *((unsigned long *)&__m256i_result[3]) = 0x0000000200000002;
27 *((unsigned long *)&__m256i_result[2]) = 0x0000008000000080;
28 *((unsigned long *)&__m256i_result[1]) = 0x0000000200000002;
29 *((unsigned long *)&__m256i_result[0]) = 0x0000008000000080;
30 __m256i_out = __lasx_xvfclass_s (__m256_op0);
31 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
32
33 *((int *)&__m256_op0[7]) = 0xffffffff;
34 *((int *)&__m256_op0[6]) = 0xffffffff;
35 *((int *)&__m256_op0[5]) = 0xffffffff;
36 *((int *)&__m256_op0[4]) = 0xffffffff;
37 *((int *)&__m256_op0[3]) = 0xffffffff;
38 *((int *)&__m256_op0[2]) = 0xffffffff;
39 *((int *)&__m256_op0[1]) = 0xffffffff;
40 *((int *)&__m256_op0[0]) = 0xffffffff;
41 *((unsigned long *)&__m256i_result[3]) = 0x0000000200000002;
42 *((unsigned long *)&__m256i_result[2]) = 0x0000000200000002;
43 *((unsigned long *)&__m256i_result[1]) = 0x0000000200000002;
44 *((unsigned long *)&__m256i_result[0]) = 0x0000000200000002;
45 __m256i_out = __lasx_xvfclass_s (__m256_op0);
46 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
47
48 *((int *)&__m256_op0[7]) = 0x00000000;
49 *((int *)&__m256_op0[6]) = 0x00000000;
50 *((int *)&__m256_op0[5]) = 0x00000000;
51 *((int *)&__m256_op0[4]) = 0x00000000;
52 *((int *)&__m256_op0[3]) = 0x00000000;
53 *((int *)&__m256_op0[2]) = 0x00000000;
54 *((int *)&__m256_op0[1]) = 0x00000000;
55 *((int *)&__m256_op0[0]) = 0x00000000;
56 *((unsigned long *)&__m256i_result[3]) = 0x0000020000000200;
57 *((unsigned long *)&__m256i_result[2]) = 0x0000020000000200;
58 *((unsigned long *)&__m256i_result[1]) = 0x0000020000000200;
59 *((unsigned long *)&__m256i_result[0]) = 0x0000020000000200;
60 __m256i_out = __lasx_xvfclass_s (__m256_op0);
61 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
62
63 *((int *)&__m256_op0[7]) = 0x00000000;
64 *((int *)&__m256_op0[6]) = 0x00000000;
65 *((int *)&__m256_op0[5]) = 0x000000ff;
66 *((int *)&__m256_op0[4]) = 0x000000ff;
67 *((int *)&__m256_op0[3]) = 0x00000000;
68 *((int *)&__m256_op0[2]) = 0x00000000;
69 *((int *)&__m256_op0[1]) = 0x000000ff;
70 *((int *)&__m256_op0[0]) = 0x000000ff;
71 *((unsigned long *)&__m256i_result[3]) = 0x0000020000000200;
72 *((unsigned long *)&__m256i_result[2]) = 0x0000010000000100;
73 *((unsigned long *)&__m256i_result[1]) = 0x0000020000000200;
74 *((unsigned long *)&__m256i_result[0]) = 0x0000010000000100;
75 __m256i_out = __lasx_xvfclass_s (__m256_op0);
76 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
77
78 *((int *)&__m256_op0[7]) = 0xfffffffb;
79 *((int *)&__m256_op0[6]) = 0xfffffffb;
80 *((int *)&__m256_op0[5]) = 0xfffffffb;
81 *((int *)&__m256_op0[4]) = 0xfffffffb;
82 *((int *)&__m256_op0[3]) = 0xfffffffb;
83 *((int *)&__m256_op0[2]) = 0xfffffffb;
84 *((int *)&__m256_op0[1]) = 0xfffffffb;
85 *((int *)&__m256_op0[0]) = 0xfffffffb;
86 *((unsigned long *)&__m256i_result[3]) = 0x0000000200000002;
87 *((unsigned long *)&__m256i_result[2]) = 0x0000000200000002;
88 *((unsigned long *)&__m256i_result[1]) = 0x0000000200000002;
89 *((unsigned long *)&__m256i_result[0]) = 0x0000000200000002;
90 __m256i_out = __lasx_xvfclass_s (__m256_op0);
91 ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
92
93 return 0;
94 }