Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfclass_s.c

raw
1 /* { dg-options "-mlsx -w -fno-strict-aliasing" } */
2 #include "../simd_correctness_check.h"
3 #include <lsxintrin.h>
4
5 int
6 main ()
7 {
8 __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result;
9 __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result;
10 __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_result;
11
12 int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail;
13 long int long_op0, long_op1, long_op2, lont_out, lont_result;
14 long int long_int_out, long_int_result;
15 unsigned int unsigned_int_out, unsigned_int_result;
16 unsigned long int unsigned_long_int_out, unsigned_long_int_result;
17
18 *((int *)&__m128_op0[3]) = 0x00000000;
19 *((int *)&__m128_op0[2]) = 0x7fff8000;
20 *((int *)&__m128_op0[1]) = 0x00010081;
21 *((int *)&__m128_op0[0]) = 0x00000005;
22 *((unsigned long *)&__m128i_result[1]) = 0x0000020000000002;
23 *((unsigned long *)&__m128i_result[0]) = 0x0000010000000100;
24 __m128i_out = __lsx_vfclass_s (__m128_op0);
25 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
26
27 *((int *)&__m128_op0[3]) = 0xfe02fe02;
28 *((int *)&__m128_op0[2]) = 0xfe02fe02;
29 *((int *)&__m128_op0[1]) = 0xfe02fe02;
30 *((int *)&__m128_op0[0]) = 0xfe02fe02;
31 *((unsigned long *)&__m128i_result[1]) = 0x0000000800000008;
32 *((unsigned long *)&__m128i_result[0]) = 0x0000000800000008;
33 __m128i_out = __lsx_vfclass_s (__m128_op0);
34 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
35
36 *((int *)&__m128_op0[3]) = 0x0000000c;
37 *((int *)&__m128_op0[2]) = 0x7fff000c;
38 *((int *)&__m128_op0[1]) = 0x10001000;
39 *((int *)&__m128_op0[0]) = 0x10001000;
40 *((unsigned long *)&__m128i_result[1]) = 0x0000010000000002;
41 *((unsigned long *)&__m128i_result[0]) = 0x0000008000000080;
42 __m128i_out = __lsx_vfclass_s (__m128_op0);
43 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
44
45 *((int *)&__m128_op0[3]) = 0x00000000;
46 *((int *)&__m128_op0[2]) = 0x00000000;
47 *((int *)&__m128_op0[1]) = 0x00000000;
48 *((int *)&__m128_op0[0]) = 0x00000000;
49 *((unsigned long *)&__m128i_result[1]) = 0x0000020000000200;
50 *((unsigned long *)&__m128i_result[0]) = 0x0000020000000200;
51 __m128i_out = __lsx_vfclass_s (__m128_op0);
52 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
53
54 *((int *)&__m128_op0[3]) = 0x00000000;
55 *((int *)&__m128_op0[2]) = 0x00000000;
56 *((int *)&__m128_op0[1]) = 0x00000000;
57 *((int *)&__m128_op0[0]) = 0x00000000;
58 *((unsigned long *)&__m128i_result[1]) = 0x0000020000000200;
59 *((unsigned long *)&__m128i_result[0]) = 0x0000020000000200;
60 __m128i_out = __lsx_vfclass_s (__m128_op0);
61 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
62
63 *((int *)&__m128_op0[3]) = 0x0c0b0a09;
64 *((int *)&__m128_op0[2]) = 0x0b0a0908;
65 *((int *)&__m128_op0[1]) = 0x0a090807;
66 *((int *)&__m128_op0[0]) = 0x09080706;
67 *((unsigned long *)&__m128i_result[1]) = 0x0000008000000080;
68 *((unsigned long *)&__m128i_result[0]) = 0x0000008000000080;
69 __m128i_out = __lsx_vfclass_s (__m128_op0);
70 ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
71
72 return 0;
73 }