/* { dg-options "-mlsx -w -fno-strict-aliasing" } */ #include "../simd_correctness_check.h" #include int main () { __m128i __m128i_op0, __m128i_op1, __m128i_op2, __m128i_out, __m128i_result; __m128 __m128_op0, __m128_op1, __m128_op2, __m128_out, __m128_result; __m128d __m128d_op0, __m128d_op1, __m128d_op2, __m128d_out, __m128d_result; int int_op0, int_op1, int_op2, int_out, int_result, i = 1, fail; long int long_op0, long_op1, long_op2, lont_out, lont_result; long int long_int_out, long_int_result; unsigned int unsigned_int_out, unsigned_int_result; unsigned long int unsigned_long_int_out, unsigned_long_int_result; *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000000; *((int *)&__m128_op0[1]) = 0x0000ffff; *((int *)&__m128_op0[0]) = 0x00000000; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x0000ffff; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000000; *((int *)&__m128_op0[1]) = 0x00000000; *((int *)&__m128_op0[0]) = 0x00000000; *((int *)&__m128_op1[3]) = 0xc2409eda; *((int *)&__m128_op1[2]) = 0xb019323f; *((int *)&__m128_op1[1]) = 0x460f3b39; *((int *)&__m128_op1[0]) = 0x3ef4be3a; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x460f3b39; *((int *)&__m128_result[0]) = 0x3ef4be3a; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000001; *((int *)&__m128_op0[1]) = 0x00000000; *((int *)&__m128_op0[0]) = 0x00000001; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000001; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000001; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000000; *((int *)&__m128_op0[1]) = 0x00000000; *((int *)&__m128_op0[0]) = 0x00000000; *((int *)&__m128_op1[3]) = 0xfefd7f7f; *((int *)&__m128_op1[2]) = 0x7f7f7f7e; *((int *)&__m128_op1[1]) = 0xdffdbffe; *((int *)&__m128_op1[0]) = 0xba6f5543; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x7f7f7f7e; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0xff84fff4; *((int *)&__m128_op0[2]) = 0xff84fff4; *((int *)&__m128_op0[1]) = 0xffffffff; *((int *)&__m128_op0[0]) = 0xfffffff0; *((int *)&__m128_op1[3]) = 0xff84fff4; *((int *)&__m128_op1[2]) = 0xff84fff4; *((int *)&__m128_op1[1]) = 0xffffffff; *((int *)&__m128_op1[0]) = 0xfffffff0; *((int *)&__m128_result[3]) = 0xffc4fff4; *((int *)&__m128_result[2]) = 0xffc4fff4; *((int *)&__m128_result[1]) = 0xffffffff; *((int *)&__m128_result[0]) = 0xfffffff0; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000000; *((int *)&__m128_op0[1]) = 0x00000000; *((int *)&__m128_op0[0]) = 0x00000000; *((int *)&__m128_op1[3]) = 0x00007fff; *((int *)&__m128_op1[2]) = 0x00007fff; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x00007fff; *((int *)&__m128_result[2]) = 0x00007fff; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0xffffffff; *((int *)&__m128_op0[1]) = 0xffffffff; *((int *)&__m128_op0[0]) = 0xffffffff; *((int *)&__m128_op1[3]) = 0xffffffff; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000000; *((int *)&__m128_op0[1]) = 0x00000000; *((int *)&__m128_op0[0]) = 0x00000000; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000001; *((int *)&__m128_op0[1]) = 0x00000000; *((int *)&__m128_op0[0]) = 0x00000000; *((int *)&__m128_op1[3]) = 0xffffffff; *((int *)&__m128_op1[2]) = 0xffffffff; *((int *)&__m128_op1[1]) = 0xffffffff; *((int *)&__m128_op1[0]) = 0xffffffff; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000001; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000000; *((int *)&__m128_op0[1]) = 0x01010001; *((int *)&__m128_op0[0]) = 0x01010001; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00020000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00020000; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00020000; *((int *)&__m128_result[1]) = 0x01010001; *((int *)&__m128_result[0]) = 0x01010001; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000000; *((int *)&__m128_op0[1]) = 0x00000000; *((int *)&__m128_op0[0]) = 0x00000000; *((int *)&__m128_op1[3]) = 0x00000020; *((int *)&__m128_op1[2]) = 0x00000020; *((int *)&__m128_op1[1]) = 0x0000001f; *((int *)&__m128_op1[0]) = 0x0000001f; *((int *)&__m128_result[3]) = 0x00000020; *((int *)&__m128_result[2]) = 0x00000020; *((int *)&__m128_result[1]) = 0x0000001f; *((int *)&__m128_result[0]) = 0x0000001f; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0xf3040705; *((int *)&__m128_op0[1]) = 0x00000000; *((int *)&__m128_op0[0]) = 0x00000000; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0xf3040705; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0xf3040705; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000004; *((int *)&__m128_op0[1]) = 0x00000000; *((int *)&__m128_op0[0]) = 0x00000004; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000004; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000004; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000004; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000004; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000000; *((int *)&__m128_op0[1]) = 0x00000000; *((int *)&__m128_op0[0]) = 0x00000000; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmax_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x0000ffff; *((int *)&__m128_op0[2]) = 0x0000ffff; *((int *)&__m128_op0[1]) = 0x0000ffff; *((int *)&__m128_op0[0]) = 0x0000fffe; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmin_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0xffffffff; *((int *)&__m128_op0[2]) = 0xffffffe5; *((int *)&__m128_op0[1]) = 0xffffffff; *((int *)&__m128_op0[0]) = 0xffffffe5; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmin_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000000; *((int *)&__m128_op0[1]) = 0x00000000; *((int *)&__m128_op0[0]) = 0x00000000; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmin_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x13121110; *((int *)&__m128_op0[2]) = 0x1211100f; *((int *)&__m128_op0[1]) = 0x11100f0e; *((int *)&__m128_op0[0]) = 0x100f0e0d; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmin_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0xffffffff; *((int *)&__m128_op0[2]) = 0xffffffff; *((int *)&__m128_op0[1]) = 0xffffffff; *((int *)&__m128_op0[0]) = 0xfffffff3; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000008; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000088; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000008; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000088; __m128_out = __lsx_vfmin_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x52525252; *((int *)&__m128_op0[2]) = 0xadadadad; *((int *)&__m128_op0[1]) = 0x52525252; *((int *)&__m128_op0[0]) = 0xadadadad; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0xffffffff; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0xffffffff; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0xadadadad; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0xadadadad; __m128_out = __lsx_vfmin_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000000; *((int *)&__m128_op0[1]) = 0x00000000; *((int *)&__m128_op0[0]) = 0x0000ffff; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x0000ffff; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x0000ffff; __m128_out = __lsx_vfmin_s (__m128_op0, __m128_op1); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); return 0; }