/* { 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]) = 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]) = 0x00000002; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x00000002; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x0028e0a1; *((int *)&__m128_op0[2]) = 0xa000a041; *((int *)&__m128_op0[1]) = 0x01000041; *((int *)&__m128_op0[0]) = 0x00010001; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x01000001; *((int *)&__m128_op1[1]) = 0x00010001; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x01000001; *((int *)&__m128_op2[1]) = 0xffffe000; *((int *)&__m128_op2[0]) = 0xffff1fff; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0x01000001; *((int *)&__m128_result[1]) = 0xffffe000; *((int *)&__m128_result[0]) = 0xffff1fff; __m128_out = __lsx_vfmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x7f800000; *((int *)&__m128_op0[2]) = 0x7f800000; *((int *)&__m128_op0[1]) = 0x7f800000; *((int *)&__m128_op0[0]) = 0x7f800000; *((int *)&__m128_op1[3]) = 0x00000002; *((int *)&__m128_op1[2]) = 0x00000002; *((int *)&__m128_op1[1]) = 0x00000003; *((int *)&__m128_op1[0]) = 0x00000003; *((int *)&__m128_op2[3]) = 0x3fc00000; *((int *)&__m128_op2[2]) = 0x3fc00000; *((int *)&__m128_op2[1]) = 0x3fc00000; *((int *)&__m128_op2[0]) = 0x3fc00000; *((int *)&__m128_result[3]) = 0x7f800000; *((int *)&__m128_result[2]) = 0x7f800000; *((int *)&__m128_result[1]) = 0x7f800000; *((int *)&__m128_result[0]) = 0x7f800000; __m128_out = __lsx_vfmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0xc1bdceee; *((int *)&__m128_op0[2]) = 0x242070db; *((int *)&__m128_op0[1]) = 0xe8c7b756; *((int *)&__m128_op0[0]) = 0xd76aa478; *((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]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x7f400000; *((int *)&__m128_op0[2]) = 0x7f040000; *((int *)&__m128_op0[1]) = 0x7f020000; *((int *)&__m128_op0[0]) = 0x7f020000; *((int *)&__m128_op1[3]) = 0xffffffff; *((int *)&__m128_op1[2]) = 0x0014002c; *((int *)&__m128_op1[1]) = 0xfffefffe; *((int *)&__m128_op1[0]) = 0x003b0013; *((int *)&__m128_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0xffffffff; *((int *)&__m128_result[2]) = 0x3ea5016b; *((int *)&__m128_result[1]) = 0xfffefffe; *((int *)&__m128_result[0]) = 0x3f6fb04d; __m128_out = __lsx_vfmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x004f0080; *((int *)&__m128_op0[2]) = 0x004f0080; *((int *)&__m128_op0[1]) = 0x004f0080; *((int *)&__m128_op0[0]) = 0x004f0080; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x00000000; *((int *)&__m128_op2[3]) = 0x7fff7fff; *((int *)&__m128_op2[2]) = 0x7fff7fff; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x7fff7fff; *((int *)&__m128_result[2]) = 0x7fff7fff; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x3d3d3d3d; *((int *)&__m128_op0[2]) = 0x3d3d3d3d; *((int *)&__m128_op0[1]) = 0x3d3d3d3d; *((int *)&__m128_op0[0]) = 0x3d3d3d3d; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00100000; *((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]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x0000bd3d; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmadd_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]) = 0x00050005; *((int *)&__m128_op1[2]) = 0x00050005; *((int *)&__m128_op1[1]) = 0x00050005; *((int *)&__m128_op1[0]) = 0x00050005; *((int *)&__m128_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[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_vfmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0xe500c085; *((int *)&__m128_op0[2]) = 0xc000c005; *((int *)&__m128_op0[1]) = 0xe5c1a185; *((int *)&__m128_op0[0]) = 0xc48004c5; *((int *)&__m128_op1[3]) = 0xffffffff; *((int *)&__m128_op1[2]) = 0xffffffff; *((int *)&__m128_op1[1]) = 0xffffc000; *((int *)&__m128_op1[0]) = 0xffffc005; *((int *)&__m128_op2[3]) = 0xff550025; *((int *)&__m128_op2[2]) = 0x002a004b; *((int *)&__m128_op2[1]) = 0x00590013; *((int *)&__m128_op2[0]) = 0x005cffca; *((int *)&__m128_result[3]) = 0xffffffff; *((int *)&__m128_result[2]) = 0xffffffff; *((int *)&__m128_result[1]) = 0xffffc000; *((int *)&__m128_result[0]) = 0xffffc005; __m128_out = __lsx_vfmadd_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]) = 0x00fe0001; *((int *)&__m128_op1[2]) = 0x00cf005f; *((int *)&__m128_op1[1]) = 0x7fff7fff; *((int *)&__m128_op1[0]) = 0x7fff7f00; *((int *)&__m128_op2[3]) = 0x5d7f5d00; *((int *)&__m128_op2[2]) = 0x7f6a007f; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x5d7f5d00; *((int *)&__m128_result[2]) = 0x7f6a007f; *((int *)&__m128_result[1]) = 0x7fff7fff; *((int *)&__m128_result[0]) = 0x7fff7f00; __m128_out = __lsx_vfmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x00680486; *((int *)&__m128_op0[2]) = 0xffffffda; *((int *)&__m128_op0[1]) = 0xffff913b; *((int *)&__m128_op0[0]) = 0xb9951901; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x00000000; *((int *)&__m128_op1[0]) = 0x01030103; *((int *)&__m128_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x00200060; *((int *)&__m128_op2[0]) = 0x00200060; *((int *)&__m128_result[3]) = 0x00000000; *((int *)&__m128_result[2]) = 0xffffffda; *((int *)&__m128_result[1]) = 0xffff913b; *((int *)&__m128_result[0]) = 0x001fed4d; __m128_out = __lsx_vfmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x001a001a; *((int *)&__m128_op0[2]) = 0x001a0008; *((int *)&__m128_op0[1]) = 0x001a001a; *((int *)&__m128_op0[0]) = 0x001a000b; *((int *)&__m128_op1[3]) = 0xffffffff; *((int *)&__m128_op1[2]) = 0xffffffff; *((int *)&__m128_op1[1]) = 0xff800001; *((int *)&__m128_op1[0]) = 0x0f800000; *((int *)&__m128_op2[3]) = 0xff800000; *((int *)&__m128_op2[2]) = 0xff800000; *((int *)&__m128_op2[1]) = 0xff800000; *((int *)&__m128_op2[0]) = 0xff800000; *((int *)&__m128_result[3]) = 0xffffffff; *((int *)&__m128_result[2]) = 0xffffffff; *((int *)&__m128_result[1]) = 0xffc00001; *((int *)&__m128_result[0]) = 0xff800000; __m128_out = __lsx_vfmadd_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0xfe3bfb01; *((int *)&__m128_op0[2]) = 0xfe3bfe01; *((int *)&__m128_op0[1]) = 0xfe03fe3f; *((int *)&__m128_op0[0]) = 0xfe01fa21; *((int *)&__m128_op1[3]) = 0xfe3bfb01; *((int *)&__m128_op1[2]) = 0xfe3bfe01; *((int *)&__m128_op1[1]) = 0xfe03fe3f; *((int *)&__m128_op1[0]) = 0xfe01fa21; *((int *)&__m128_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0x7f800000; *((int *)&__m128_result[2]) = 0x7f800000; *((int *)&__m128_result[1]) = 0x7f800000; *((int *)&__m128_result[0]) = 0x7f800000; __m128_out = __lsx_vfmadd_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]) = 0x00000000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmsub_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0xffffe001; *((int *)&__m128_op0[2]) = 0xffffe001; *((int *)&__m128_op0[1]) = 0xffffe001; *((int *)&__m128_op0[0]) = 0xffffe001; *((int *)&__m128_op1[3]) = 0xffffffff; *((int *)&__m128_op1[2]) = 0xffffffff; *((int *)&__m128_op1[1]) = 0xffffe000; *((int *)&__m128_op1[0]) = 0x01ffe200; *((int *)&__m128_op2[3]) = 0x04040383; *((int *)&__m128_op2[2]) = 0x83838404; *((int *)&__m128_op2[1]) = 0x04040383; *((int *)&__m128_op2[0]) = 0x83838404; *((int *)&__m128_result[3]) = 0xffffe001; *((int *)&__m128_result[2]) = 0xffffe001; *((int *)&__m128_result[1]) = 0xffffe001; *((int *)&__m128_result[0]) = 0xffffe001; __m128_out = __lsx_vfmsub_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x18171615; *((int *)&__m128_op0[2]) = 0x17161514; *((int *)&__m128_op0[1]) = 0x16151413; *((int *)&__m128_op0[0]) = 0x151d3756; *((int *)&__m128_op1[3]) = 0x00000000; *((int *)&__m128_op1[2]) = 0x00000000; *((int *)&__m128_op1[1]) = 0x39412488; *((int *)&__m128_op1[0]) = 0x80000000; *((int *)&__m128_op2[3]) = 0x3ff00000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x40f3fa00; *((int *)&__m128_op2[0]) = 0x00000000; *((int *)&__m128_result[3]) = 0xbff00000; *((int *)&__m128_result[2]) = 0x00000000; *((int *)&__m128_result[1]) = 0xc0f3fa00; *((int *)&__m128_result[0]) = 0x80000000; __m128_out = __lsx_vfmsub_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]) = 0x00000005; *((int *)&__m128_op2[3]) = 0x00000000; *((int *)&__m128_op2[2]) = 0x00000000; *((int *)&__m128_op2[1]) = 0x00000000; *((int *)&__m128_op2[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_vfmsub_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]) = 0x3ddc5dac; *((int *)&__m128_op1[3]) = 0xffffffff; *((int *)&__m128_op1[2]) = 0xffffffff; *((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]) = 0xffffffff; *((int *)&__m128_result[2]) = 0xffffffff; *((int *)&__m128_result[1]) = 0x00000000; *((int *)&__m128_result[0]) = 0x00000000; __m128_out = __lsx_vfmsub_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); *((int *)&__m128_op0[3]) = 0x63636b6a; *((int *)&__m128_op0[2]) = 0xfe486741; *((int *)&__m128_op0[1]) = 0x41f8e880; *((int *)&__m128_op0[0]) = 0xffffffff; *((int *)&__m128_op1[3]) = 0xe3636363; *((int *)&__m128_op1[2]) = 0x63abdf16; *((int *)&__m128_op1[1]) = 0x41f8e080; *((int *)&__m128_op1[0]) = 0x16161198; *((int *)&__m128_op2[3]) = 0x00c27580; *((int *)&__m128_op2[2]) = 0x00bccf42; *((int *)&__m128_op2[1]) = 0x00a975be; *((int *)&__m128_op2[0]) = 0x00accf03; *((int *)&__m128_result[3]) = 0xff800000; *((int *)&__m128_result[2]) = 0xff800000; *((int *)&__m128_result[1]) = 0x4471fb84; *((int *)&__m128_result[0]) = 0xffffffff; __m128_out = __lsx_vfmsub_s (__m128_op0, __m128_op1, __m128_op2); ASSERTEQ_32 (__LINE__, __m128_result, __m128_out); return 0; }