/* { 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]) = 0xffffffff; *((int *)&__m128_op0[2]) = 0xffffffff; *((int *)&__m128_op0[1]) = 0xfffffffe; *((int *)&__m128_op0[0]) = 0xbe6ed565; *((int *)&__m128_op1[3]) = 0x195f307a; *((int *)&__m128_op1[2]) = 0x5d04acbb; *((int *)&__m128_op1[1]) = 0x6a1a3fbb; *((int *)&__m128_op1[0]) = 0x3c90260e; *((int *)&__m128_op2[3]) = 0xffffffff; *((int *)&__m128_op2[2]) = 0xffffffff; *((int *)&__m128_op2[1]) = 0xfffffffe; *((int *)&__m128_op2[0]) = 0xbe6ed565; *((int *)&__m128_result[3]) = 0xffffffff; *((int *)&__m128_result[2]) = 0xffffffff; *((int *)&__m128_result[1]) = 0xfffffffe; *((int *)&__m128_result[0]) = 0x3e730941; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); 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]) = 0xff01ff01; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_op2[3]) = 0xffffffff; *((int *)&__m128_op2[2]) = 0xffffffff; *((int *)&__m128_op2[1]) = 0xffffffff; *((int *)&__m128_op2[0]) = 0xff01ff01; *((int *)&__m128_result[3]) = 0xffffffff; *((int *)&__m128_result[2]) = 0xffffffff; *((int *)&__m128_result[1]) = 0xffffffff; *((int *)&__m128_result[0]) = 0x7f01ff01; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); 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]) = 0xffffffff; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0xffffffff; *((int *)&__m128_op2[3]) = 0x00307028; *((int *)&__m128_op2[2]) = 0x003f80b0; *((int *)&__m128_op2[1]) = 0x0040007f; *((int *)&__m128_op2[0]) = 0xff800000; *((int *)&__m128_result[3]) = 0x80307028; *((int *)&__m128_result[2]) = 0xffffffff; *((int *)&__m128_result[1]) = 0x8040007f; *((int *)&__m128_result[0]) = 0xffffffff; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000049; *((int *)&__m128_op0[2]) = 0x0000004d; *((int *)&__m128_op0[1]) = 0x00000001; *((int *)&__m128_op0[0]) = 0xffffffff; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000001; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x00000001; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x80000000; *((int *)&__m128_result[2]) = 0x80000000; *((int *)&__m128_result[1]) = 0x80000001; *((int *)&__m128_result[0]) = 0xffffffff; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0xffffffff; *((int *)&__m128_op0[2]) = 0xffff0000; *((int *)&__m128_op0[1]) = 0x00ff0000; *((int *)&__m128_op0[0]) = 0x00ff0000; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000800; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_op2[3]) = 0xffffffff; *((int *)&__m128_op2[2]) = 0xfffff800; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0xffffffff; *((int *)&__m128_result[2]) = 0xfffff800; *((int *)&__m128_result[1]) = 0x80000000; *((int *)&__m128_result[0]) = 0x80000000; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); 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_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x80000000; *((int *)&__m128_result[2]) = 0x80000000; *((int *)&__m128_result[1]) = 0x80000000; *((int *)&__m128_result[0]) = 0x80000000; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00030000; *((int *)&__m128_op0[2]) = 0x00010000; *((int *)&__m128_op0[1]) = 0x00020000; *((int *)&__m128_op0[0]) = 0x00010000; *((int *)&__m128_op1[3]) = 0x3f800000; *((int *)&__m128_op1[2]) = 0x3f800000; *((int *)&__m128_op1[1]) = 0x3f800000; *((int *)&__m128_op1[0]) = 0x3f800000; *((int *)&__m128_op2[3]) = 0x00030000; *((int *)&__m128_op2[2]) = 0x00010000; *((int *)&__m128_op2[1]) = 0x00020000; *((int *)&__m128_op2[0]) = 0x00010000; *((int *)&__m128_result[3]) = 0x80060000; *((int *)&__m128_result[2]) = 0x80020000; *((int *)&__m128_result[1]) = 0x80040000; *((int *)&__m128_result[0]) = 0x80020000; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000008; *((int *)&__m128_op0[2]) = 0x97957687; *((int *)&__m128_op0[1]) = 0x00000000; *((int *)&__m128_op0[0]) = 0x00000408; *((int *)&__m128_op1[3]) = 0x00000008; *((int *)&__m128_op1[2]) = 0x97957687; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000408; *((int *)&__m128_op2[3]) = 0x00010001; *((int *)&__m128_op2[2]) = 0x00010001; *((int *)&__m128_op2[1]) = 0x00010001; *((int *)&__m128_op2[0]) = 0x04000800; *((int *)&__m128_result[3]) = 0x80010001; *((int *)&__m128_result[2]) = 0x80010001; *((int *)&__m128_result[1]) = 0x80010001; *((int *)&__m128_result[0]) = 0x84000800; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0xffc2ffe7; *((int *)&__m128_op0[2]) = 0x00000007; *((int *)&__m128_op0[1]) = 0x0000ffc1; *((int *)&__m128_op0[0]) = 0x00010001; *((int *)&__m128_op1[3]) = 0xffc2ffe7; *((int *)&__m128_op1[2]) = 0x00000007; *((int *)&__m128_op1[1]) = 0x0000ffc1; *((int *)&__m128_op1[0]) = 0x00010001; *((int *)&__m128_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x000ffc2f; *((int *)&__m128_op2[1]) = 0x00201df0; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0xffc2ffe7; *((int *)&__m128_result[2]) = 0x800ffc2f; *((int *)&__m128_result[1]) = 0x80201df0; *((int *)&__m128_result[0]) = 0x80000000; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); 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_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x80000000; *((int *)&__m128_result[2]) = 0x80000000; *((int *)&__m128_result[1]) = 0x80000000; *((int *)&__m128_result[0]) = 0x80000000; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); 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]) = 0x00000005; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x80000000; *((int *)&__m128_result[2]) = 0x80000000; *((int *)&__m128_result[1]) = 0x80000000; *((int *)&__m128_result[0]) = 0x80000000; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x80808080; *((int *)&__m128_op0[2]) = 0x80808080; *((int *)&__m128_op0[1]) = 0x80808080; *((int *)&__m128_op0[0]) = 0x80800008; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x80000000; *((int *)&__m128_result[2]) = 0x80000000; *((int *)&__m128_result[1]) = 0x80000000; *((int *)&__m128_result[0]) = 0x80000000; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00000000; *((int *)&__m128_op0[2]) = 0x00000000; *((int *)&__m128_op0[1]) = 0x31313131; *((int *)&__m128_op0[0]) = 0x31313131; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x31313131; *((int *)&__m128_op1[0]) = 0x31313131; *((int *)&__m128_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000008; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x80000000; *((int *)&__m128_result[2]) = 0x80000008; *((int *)&__m128_result[1]) = 0xa2f54a1e; *((int *)&__m128_result[0]) = 0xa2f54a1e; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); 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_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x80000000; *((int *)&__m128_result[2]) = 0x80000000; *((int *)&__m128_result[1]) = 0x80000000; *((int *)&__m128_result[0]) = 0x80000000; __m128_out = __lsx_vfnmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0xa486c90f; *((int *)&__m128_op0[2]) = 0x157ca12e; *((int *)&__m128_op0[1]) = 0x58bcc201; *((int *)&__m128_op0[0]) = 0x2e635d65; *((int *)&__m128_op1[3]) = 0x6d564875; *((int *)&__m128_op1[2]) = 0xf8760005; *((int *)&__m128_op1[1]) = 0x8dc5a4d1; *((int *)&__m128_op1[0]) = 0x79ffa22f; *((int *)&__m128_op2[3]) = 0xffffffff; *((int *)&__m128_op2[2]) = 0xd2436487; *((int *)&__m128_op2[1]) = 0x0fa96b88; *((int *)&__m128_op2[0]) = 0x5f94ab13; *((int *)&__m128_result[3]) = 0xffffffff; *((int *)&__m128_result[2]) = 0xd24271c4; *((int *)&__m128_result[1]) = 0x2711bad1; *((int *)&__m128_result[0]) = 0xe8e309ed; __m128_out = __lsx_vfnmsub_s (__m128_op0, __m128_op1, __m128_op2); 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_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x80000000; *((int *)&__m128_result[2]) = 0x80000000; *((int *)&__m128_result[1]) = 0x80000000; *((int *)&__m128_result[0]) = 0x80000000; __m128_out = __lsx_vfnmsub_s (__m128_op0, __m128_op1, __m128_op2); 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_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x007ffd00; *((int *)&__m128_op2[0]) = 0x01400840; *((int *)&__m128_result[3]) = 0x80000000; *((int *)&__m128_result[2]) = 0x80000000; *((int *)&__m128_result[1]) = 0x007ffd00; *((int *)&__m128_result[0]) = 0x01400840; __m128_out = __lsx_vfnmsub_s (__m128_op0, __m128_op1, __m128_op2); 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_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x7f800000; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x80000000; *((int *)&__m128_result[2]) = 0x80000000; *((int *)&__m128_result[1]) = 0x7f800000; *((int *)&__m128_result[0]) = 0x80000000; __m128_out = __lsx_vfnmsub_s (__m128_op0, __m128_op1, __m128_op2); 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_op2[3]) = 0xcd636363; *((int *)&__m128_op2[2]) = 0xcd636363; *((int *)&__m128_op2[1]) = 0xcd636363; *((int *)&__m128_op2[0]) = 0xcd636363; *((int *)&__m128_result[3]) = 0xcd636363; *((int *)&__m128_result[2]) = 0xcd636363; *((int *)&__m128_result[1]) = 0xcd636363; *((int *)&__m128_result[0]) = 0xcd636363; __m128_out = __lsx_vfnmsub_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); return 0; }