| 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 |
*((unsigned long *)&__m128i_op0[1]) = 0x1dcc4255c9d85c05; |
| 19 |
*((unsigned long *)&__m128i_op0[0]) = 0x3ab7a3fc47a5c31a; |
| 20 |
*((unsigned long *)&__m128i_result[1]) = 0x1dcc4255c9d85c05; |
| 21 |
*((unsigned long *)&__m128i_result[0]) = 0x3ab7a3fc47a5c31a; |
| 22 |
__m128i_out = __lsx_vld ((unsigned long *)&__m128i_op0, 0x0); |
| 23 |
ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); |
| 24 |
|
| 25 |
*((unsigned long *)&__m128i_op0[1]) = 0x1dcc4255c9d85c05; |
| 26 |
*((unsigned long *)&__m128i_op0[0]) = 0x3ab7a3fc47a5c31a; |
| 27 |
*((unsigned long *)&__m128i_result[1]) = 0x1dcc4255c9d85c05; |
| 28 |
*((unsigned long *)&__m128i_result[0]) = 0x3ab7a3fc47a5c31a; |
| 29 |
__m128i_out = __lsx_vldx ((unsigned long *)&__m128i_op0, 0x0); |
| 30 |
ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); |
| 31 |
|
| 32 |
*((unsigned long *)&__m128i_op0[1]) = 0x1dcc4255c9d85c05; |
| 33 |
*((unsigned long *)&__m128i_op0[0]) = 0x3ab7a3fc47a5c31a; |
| 34 |
*((unsigned long *)&__m128i_result[1]) = 0xc3c3c3c3c3c3c3c3; |
| 35 |
*((unsigned long *)&__m128i_result[0]) = 0xc3c3c3c3c3c3c3c3; |
| 36 |
__m128i_out = __lsx_vldrepl_b ((unsigned long *)&__m128i_op0, 0x1); |
| 37 |
ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); |
| 38 |
|
| 39 |
*((unsigned long *)&__m128i_op0[1]) = 0x1dcc4255c9d85c05; |
| 40 |
*((unsigned long *)&__m128i_op0[0]) = 0x3ab7a3fc47a5c31a; |
| 41 |
*((unsigned long *)&__m128i_result[1]) = 0xc31ac31ac31ac31a; |
| 42 |
*((unsigned long *)&__m128i_result[0]) = 0xc31ac31ac31ac31a; |
| 43 |
__m128i_out = __lsx_vldrepl_h ((unsigned long *)&__m128i_op0, 0x0); |
| 44 |
ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); |
| 45 |
|
| 46 |
*((unsigned long *)&__m128i_op0[1]) = 0x1dcc4255c9d85c05; |
| 47 |
*((unsigned long *)&__m128i_op0[0]) = 0x3ab7a3fc47a5c31a; |
| 48 |
*((unsigned long *)&__m128i_result[1]) = 0x47a5c31a47a5c31a; |
| 49 |
*((unsigned long *)&__m128i_result[0]) = 0x47a5c31a47a5c31a; |
| 50 |
__m128i_out = __lsx_vldrepl_w ((unsigned long *)&__m128i_op0, 0x0); |
| 51 |
ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); |
| 52 |
|
| 53 |
*((unsigned long *)&__m128i_op0[1]) = 0x1dcc4255c9d85c05; |
| 54 |
*((unsigned long *)&__m128i_op0[0]) = 0x3ab7a3fc47a5c31a; |
| 55 |
*((unsigned long *)&__m128i_result[1]) = 0x3ab7a3fc47a5c31a; |
| 56 |
*((unsigned long *)&__m128i_result[0]) = 0x3ab7a3fc47a5c31a; |
| 57 |
__m128i_out = __lsx_vldrepl_d ((unsigned long *)&__m128i_op0, 0x0); |
| 58 |
ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out); |
| 59 |
|
| 60 |
return 0; |
| 61 |
} |