代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gcc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From f9098b58fe79ba960e41b7ec6a05ba2ea18ca02e Mon Sep 17 00:00:00 2001
From: Xiaolong Chen <chenxiaolong@loongson.cn>
Date: Mon, 11 Sep 2023 09:42:39 +0800
Subject: [PATCH 079/124] LoongArch: Add tests for SX vector floating-point
instructions.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/vector/lsx/lsx-vfcvt-1.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vfcvt-2.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vffint-1.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vffint-2.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vffint-3.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vfrint_d.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vfrint_s.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vftint-1.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vftint-2.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vftint-3.c: New test.
* gcc.target/loongarch/vector/lsx/lsx-vftint-4.c: New test.
Signed-off-by: Peng Fan <fanpeng@loongson.cn>
Signed-off-by: ticat_fp <fanpeng@loongson.cn>
---
.../loongarch/vector/lsx/lsx-vfcvt-1.c | 398 +++++++
.../loongarch/vector/lsx/lsx-vfcvt-2.c | 278 +++++
.../loongarch/vector/lsx/lsx-vffint-1.c | 161 +++
.../loongarch/vector/lsx/lsx-vffint-2.c | 264 +++++
.../loongarch/vector/lsx/lsx-vffint-3.c | 102 ++
.../loongarch/vector/lsx/lsx-vfrint_d.c | 230 ++++
.../loongarch/vector/lsx/lsx-vfrint_s.c | 350 ++++++
.../loongarch/vector/lsx/lsx-vftint-1.c | 349 ++++++
.../loongarch/vector/lsx/lsx-vftint-2.c | 695 +++++++++++
.../loongarch/vector/lsx/lsx-vftint-3.c | 1028 +++++++++++++++++
.../loongarch/vector/lsx/lsx-vftint-4.c | 345 ++++++
11 files changed, 4200 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfcvt-1.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfcvt-2.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-1.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-2.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-3.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfrint_d.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfrint_s.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-1.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-2.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-3.c
create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-4.c
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfcvt-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfcvt-1.c
new file mode 100644
index 000000000..d4a86e262
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfcvt-1.c
@@ -0,0 +1,398 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+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;
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00e0000000e00000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000002a55005501;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000002a55000001;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x36280000;
+ *((int *)&__m128_result[1]) = 0x42a00000;
+ *((int *)&__m128_result[0]) = 0x42a02000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0xf436f3f5;
+ *((int *)&__m128_op0[0]) = 0x2f4ef4a8;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfcvth_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffcfb799f1;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0282800002828282;
+ *((int *)&__m128_result[3]) = 0xffffe000;
+ *((int *)&__m128_result[2]) = 0xffffe000;
+ *((int *)&__m128_result[1]) = 0xc1f6e000;
+ *((int *)&__m128_result[0]) = 0xbb3e2000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000040004000100;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000006f00001f0a;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000958affff995d;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x36de0000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x3be14000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x41dfffff00000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x403be000;
+ *((int *)&__m128_result[2]) = 0xffffe000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x63637687;
+ *((int *)&__m128_op0[2]) = 0x636316bb;
+ *((int *)&__m128_op0[1]) = 0x63636363;
+ *((int *)&__m128_op0[0]) = 0x63636363;
+ *((unsigned long *)&__m128d_result[1]) = 0x446c6ed0e0000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x446c62d760000000;
+ __m128d_out = __lsx_vfcvth_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfcvth_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((int *)&__m128_op0[3]) = 0x000000ff;
+ *((int *)&__m128_op0[2]) = 0x000000ff;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x371fe00000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x371fe00000000000;
+ __m128d_out = __lsx_vfcvth_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x6363636363636363;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xfffffffff7fff7ef;
+ *((unsigned long *)&__m128i_op0[0]) = 0x80808080ffffffff;
+ *((int *)&__m128_result[3]) = 0xffffe000;
+ *((int *)&__m128_result[2]) = 0xffffe000;
+ *((int *)&__m128_result[1]) = 0xc6ffe000;
+ *((int *)&__m128_result[0]) = 0xc6fde000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ 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]) = 0xffffffff;
+ *((unsigned long *)&__m128d_result[1]) = 0xffffffffe0000000;
+ *((unsigned long *)&__m128d_result[0]) = 0xffffffffe0000000;
+ __m128d_out = __lsx_vfcvth_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffe1ffc100000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000400000;
+ *((int *)&__m128_result[3]) = 0xfffc2000;
+ *((int *)&__m128_result[2]) = 0xfff82000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ 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;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfcvth_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((int *)&__m128_op0[3]) = 0x0000b3a6;
+ *((int *)&__m128_op0[2]) = 0x000067da;
+ *((int *)&__m128_op0[1]) = 0x00004e42;
+ *((int *)&__m128_op0[0]) = 0x0000c26a;
+ *((unsigned long *)&__m128d_result[1]) = 0x379674c000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x3789f68000000000;
+ __m128d_out = __lsx_vfcvth_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0xffff0000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0xffffffffe0000000;
+ __m128d_out = __lsx_vfcvth_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0001001001000080;
+ *((unsigned long *)&__m128i_op0[0]) = 0x4195d926d8018000;
+ *((int *)&__m128_result[3]) = 0x33800000;
+ *((int *)&__m128_result[2]) = 0x35800000;
+ *((int *)&__m128_result[1]) = 0x37800000;
+ *((int *)&__m128_result[0]) = 0x37000000;
+ __m128_out = __lsx_vfcvth_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfcvth_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((int *)&__m128_result[3]) = 0xffffe000;
+ *((int *)&__m128_result[2]) = 0xffffe000;
+ *((int *)&__m128_result[1]) = 0xffffe000;
+ *((int *)&__m128_result[0]) = 0xffffe000;
+ __m128_out = __lsx_vfcvtl_s_h (__m128i_op0);
+ 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;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfcvtl_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000a000a000a000a;
+ *((unsigned long *)&__m128i_op0[0]) = 0x000a000a000a000a;
+ *((int *)&__m128_result[3]) = 0x35200000;
+ *((int *)&__m128_result[2]) = 0x35200000;
+ *((int *)&__m128_result[1]) = 0x35200000;
+ *((int *)&__m128_result[0]) = 0x35200000;
+ __m128_out = __lsx_vfcvtl_s_h (__m128i_op0);
+ 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;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfcvtl_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000100;
+ *((int *)&__m128_op0[2]) = 0x0f00fe00;
+ *((int *)&__m128_op0[1]) = 0x0000017f;
+ *((int *)&__m128_op0[0]) = 0xff00fe7f;
+ *((unsigned long *)&__m128d_result[1]) = 0x3727f00000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0xc7e01fcfe0000000;
+ __m128d_out = __lsx_vfcvtl_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfcvtl_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000020;
+ *((int *)&__m128_op0[0]) = 0x00000020;
+ *((unsigned long *)&__m128d_result[1]) = 0x36f0000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x36f0000000000000;
+ __m128d_out = __lsx_vfcvtl_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xbd994889;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x0a092444;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x3941248880000000;
+ __m128d_out = __lsx_vfcvtl_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x62cbf96e4acfaf40;
+ *((unsigned long *)&__m128i_op0[0]) = 0xf0bc9a5278285a4a;
+ *((int *)&__m128_result[3]) = 0xc6178000;
+ *((int *)&__m128_result[2]) = 0xbb4a4000;
+ *((int *)&__m128_result[1]) = 0x47050000;
+ *((int *)&__m128_result[0]) = 0x43494000;
+ __m128_out = __lsx_vfcvtl_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x00040004;
+ *((int *)&__m128_op0[2]) = 0x00040004;
+ *((int *)&__m128_op0[1]) = 0x00040004;
+ *((int *)&__m128_op0[0]) = 0x00040004;
+ *((unsigned long *)&__m128d_result[1]) = 0x37c0001000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x37c0001000000000;
+ __m128d_out = __lsx_vfcvtl_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xff00ff00ff00ff00;
+ *((unsigned long *)&__m128i_op0[0]) = 0xff00ff00ff00ff00;
+ *((int *)&__m128_result[3]) = 0xffe00000;
+ *((int *)&__m128_result[2]) = 0xffe00000;
+ *((int *)&__m128_result[1]) = 0xffe00000;
+ *((int *)&__m128_result[0]) = 0xffe00000;
+ __m128_out = __lsx_vfcvtl_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvtl_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvtl_s_h (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000ffffffff;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0xffffe000;
+ *((int *)&__m128_result[0]) = 0xffffe000;
+ __m128_out = __lsx_vfcvtl_s_h (__m128i_op0);
+ 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;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfcvtl_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfcvtl_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x007f7f7f;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x380fdfdfc0000000;
+ __m128d_out = __lsx_vfcvtl_d_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfcvt-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfcvt-2.c
new file mode 100644
index 000000000..e8f4f12b9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfcvt-2.c
@@ -0,0 +1,278 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+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]) = 0x004200a0;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x004200a0;
+ *((int *)&__m128_op0[0]) = 0x00200001;
+ *((int *)&__m128_op1[3]) = 0x004200a0;
+ *((int *)&__m128_op1[2]) = 0x00000000;
+ *((int *)&__m128_op1[1]) = 0x004200a0;
+ *((int *)&__m128_op1[0]) = 0x00200000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vfcvt_h_s (__m128_op0, __m128_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((int *)&__m128_op1[3]) = 0x00010001;
+ *((int *)&__m128_op1[2]) = 0x0001007c;
+ *((int *)&__m128_op1[1]) = 0x00010001;
+ *((int *)&__m128_op1[0]) = 0x00010001;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vfcvt_h_s (__m128_op0, __m128_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_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;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vfcvt_h_s (__m128_op0, __m128_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((int *)&__m128_op1[3]) = 0x00000000;
+ *((int *)&__m128_op1[2]) = 0x00000000;
+ *((int *)&__m128_op1[1]) = 0x00000000;
+ *((int *)&__m128_op1[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vfcvt_h_s (__m128_op0, __m128_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_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]) = 0x80808080;
+ *((int *)&__m128_op1[2]) = 0x80808080;
+ *((int *)&__m128_op1[1]) = 0x80808080;
+ *((int *)&__m128_op1[0]) = 0x80808080;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x8000800080008000;
+ __m128i_out = __lsx_vfcvt_h_s (__m128_op0, __m128_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((int *)&__m128_op1[3]) = 0x00000000;
+ *((int *)&__m128_op1[2]) = 0x00000000;
+ *((int *)&__m128_op1[1]) = 0x00000000;
+ *((int *)&__m128_op1[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffff0000ffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vfcvt_h_s (__m128_op0, __m128_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_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;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vfcvt_h_s (__m128_op0, __m128_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xfffffffc;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xfffffffc;
+ *((int *)&__m128_op1[3]) = 0x00000001;
+ *((int *)&__m128_op1[2]) = 0x00000000;
+ *((int *)&__m128_op1[1]) = 0x00000000;
+ *((int *)&__m128_op1[0]) = 0x00000103;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vfcvt_h_s (__m128_op0, __m128_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000800000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x00000049000000c0;
+ *((unsigned long *)&__m128d_op0[0]) = 0x00000000ffffff29;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000100000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x7ff0000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x7f800000;
+ *((int *)&__m128_result[0]) = 0x7f800000;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x000000002c002400;
+ *((unsigned long *)&__m128d_op1[1]) = 0x7ef400ad21fc7081;
+ *((unsigned long *)&__m128d_op1[0]) = 0x28bf0351ec69b5f2;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x7f800000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x00000dc300003ffb;
+ *((unsigned long *)&__m128d_op0[0]) = 0x00000dc300003ffb;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000ffff3fbfffff;
+ *((unsigned long *)&__m128d_op1[0]) = 0x7fffffff7fffffff;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x7ffffffb;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xbba0c07b51230d5c;
+ *((unsigned long *)&__m128d_op0[0]) = 0xa15f3f9e8763c2b9;
+ *((unsigned long *)&__m128d_op1[1]) = 0xbba0c07b51230d5c;
+ *((unsigned long *)&__m128d_op1[0]) = 0xa15f3f9e8763c2b9;
+ *((int *)&__m128_result[3]) = 0x9d0603db;
+ *((int *)&__m128_result[2]) = 0x80000000;
+ *((int *)&__m128_result[1]) = 0x9d0603db;
+ *((int *)&__m128_result[0]) = 0x80000000;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000005;
+ *((unsigned long *)&__m128d_op1[1]) = 0x8101010181010101;
+ *((unsigned long *)&__m128d_op1[0]) = 0x8101010181010101;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x80000000;
+ *((int *)&__m128_result[0]) = 0x80000000;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffc00000ff800000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op1[0]) = 0xffffffffffffffff;
+ *((int *)&__m128_result[3]) = 0xff800000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0xffffffff;
+ *((int *)&__m128_result[0]) = 0xffffffff;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0xfffdfffe80008000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x000000ff00000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0xffeffff4;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x7f8000007f800000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x7f800000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000090;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000090;
+ *((unsigned long *)&__m128d_op1[1]) = 0x004eff6200d2ff76;
+ *((unsigned long *)&__m128d_op1[0]) = 0xff70002800be00a0;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0xff800000;
+ __m128_out = __lsx_vfcvt_s_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-1.c
new file mode 100644
index 000000000..85db95762
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-1.c
@@ -0,0 +1,161 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+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;
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffinth_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffinth_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000001f0a;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffinth_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7fffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7fffffffffffffff;
+ *((unsigned long *)&__m128d_result[1]) = 0x41dfffffffc00000;
+ *((unsigned long *)&__m128d_result[0]) = 0xbff0000000000000;
+ __m128d_out = __lsx_vffinth_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ int_out = __lsx_vpickve2gr_w (__m128i_op0, 0x2);
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000003a24;
+ *((unsigned long *)&__m128i_op0[0]) = 0x003dbe88077c78c1;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x40cd120000000000;
+ __m128d_out = __lsx_vffinth_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffinth_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000040;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000040;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x4050000000000000;
+ __m128d_out = __lsx_vffinth_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0086000000040000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0082000000000007;
+ *((unsigned long *)&__m128d_result[1]) = 0x4160c00000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x4110000000000000;
+ __m128d_out = __lsx_vffinth_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffinth_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xff8000010f800000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffinth_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000000051649b6;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000003e0000003f;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x41945926d8000000;
+ __m128d_out = __lsx_vffinth_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffintl_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xfe82fe0200000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfe82fe0200000000;
+ *((unsigned long *)&__m128d_result[1]) = 0xc177d01fe0000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffintl_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffintl_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x000100010001007c;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0001000100010001;
+ *((unsigned long *)&__m128d_result[1]) = 0x40f0001000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x40f0001000000000;
+ __m128d_out = __lsx_vffintl_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000100013fa0;
+ *((unsigned long *)&__m128d_result[1]) = 0x3ff0000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x40f3fa0000000000;
+ __m128d_out = __lsx_vffintl_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00000000fffe0001;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0xc0fffff000000000;
+ __m128d_out = __lsx_vffintl_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffintl_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffintl_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffintl_d_w (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-2.c
new file mode 100644
index 000000000..f8839cfcd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-2.c
@@ -0,0 +1,264 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+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;
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x03ff03ff03ff03ff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x438ff81ff81ff820;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffint_d_l (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x4f8000004f800000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x4f8000004f800000;
+ *((unsigned long *)&__m128d_result[1]) = 0x43d3e0000013e000;
+ *((unsigned long *)&__m128d_result[0]) = 0x43d3e0000013e000;
+ __m128d_out = __lsx_vffint_d_l (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffint_d_l (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffint_d_l (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_result[1]) = 0xbff0000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0xbff0000000000000;
+ __m128d_out = __lsx_vffint_d_l (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0674c8868a74fc80;
+ *((unsigned long *)&__m128i_op0[0]) = 0xfdce8003090b0906;
+ *((unsigned long *)&__m128d_result[1]) = 0x4399d3221a29d3f2;
+ *((unsigned long *)&__m128d_result[0]) = 0xc3818bffe7b7a7b8;
+ __m128d_out = __lsx_vffint_d_l (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x00ff00ff00ff00ff;
+ *((int *)&__m128_result[3]) = 0x4b7f00ff;
+ *((int *)&__m128_result[2]) = 0x4b7f00ff;
+ *((int *)&__m128_result[1]) = 0x4b7f00ff;
+ *((int *)&__m128_result[0]) = 0x4b7f00ff;
+ __m128_out = __lsx_vffint_s_w (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000401000001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0001000100000004;
+ *((int *)&__m128_result[3]) = 0x40800000;
+ *((int *)&__m128_result[2]) = 0x4b800000;
+ *((int *)&__m128_result[1]) = 0x47800080;
+ *((int *)&__m128_result[0]) = 0x40800000;
+ __m128_out = __lsx_vffint_s_w (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000800000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x47000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vffint_s_w (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x76f424887fffffff;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x3f800000;
+ *((int *)&__m128_result[1]) = 0x4eede849;
+ *((int *)&__m128_result[0]) = 0x4f000000;
+ __m128_out = __lsx_vffint_s_w (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xd70b30c96ea9f4e8;
+ *((unsigned long *)&__m128i_op0[0]) = 0xa352bfac9269e0aa;
+ *((int *)&__m128_result[3]) = 0xce23d33d;
+ *((int *)&__m128_result[2]) = 0x4edd53ea;
+ *((int *)&__m128_result[1]) = 0xceb95a81;
+ *((int *)&__m128_result[0]) = 0xcedb2c3f;
+ __m128_out = __lsx_vffint_s_w (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x3f800000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vffint_s_w (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vffint_s_w (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vffint_s_w (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000003ff8;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x467fe000;
+ __m128_out = __lsx_vffint_s_w (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xffffffff80000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0xbf800000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0xcf000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vffint_s_l (__m128i_op0, __m128i_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vffint_s_l (__m128i_op0, __m128i_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x7f8000007f800000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x7f8000007f800000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x5eff0000;
+ *((int *)&__m128_result[2]) = 0x5eff0000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vffint_s_l (__m128i_op0, __m128i_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x00000000000000e3;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0xfda9b23a624082fd;
+ *((unsigned long *)&__m128i_op1[0]) = 0x00000000ffff0000;
+ *((int *)&__m128_result[3]) = 0x43630000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0xdc159371;
+ *((int *)&__m128_result[0]) = 0x4f7fff00;
+ __m128_out = __lsx_vffint_s_l (__m128i_op0, __m128i_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vffint_s_l (__m128i_op0, __m128i_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vffint_s_l (__m128i_op0, __m128i_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000040;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000040;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x42800000;
+ *((int *)&__m128_result[0]) = 0x42800000;
+ __m128_out = __lsx_vffint_s_l (__m128i_op0, __m128i_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000100;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000100;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x43800000;
+ *((int *)&__m128_result[0]) = 0x43800000;
+ __m128_out = __lsx_vffint_s_l (__m128i_op0, __m128i_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vffint_s_l (__m128i_op0, __m128i_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[1]) = 0x001effae001effae;
+ *((unsigned long *)&__m128i_op1[0]) = 0x001effae001effae;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x59f7fd70;
+ *((int *)&__m128_result[0]) = 0x59f7fd70;
+ __m128_out = __lsx_vffint_s_l (__m128i_op0, __m128i_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op1[0]) = 0x000ef0000000003b;
+ *((int *)&__m128_result[3]) = 0x577fff00;
+ *((int *)&__m128_result[2]) = 0x577fff00;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x596f0000;
+ __m128_out = __lsx_vffint_s_l (__m128i_op0, __m128i_op1);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-3.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-3.c
new file mode 100644
index 000000000..9150e27ca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-3.c
@@ -0,0 +1,102 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+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;
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x8493941335f5cc0c;
+ *((unsigned long *)&__m128i_op0[0]) = 0x625a7312befcb21e;
+ *((unsigned long *)&__m128d_result[1]) = 0x43e092728266beba;
+ *((unsigned long *)&__m128d_result[0]) = 0x43d8969cc4afbf2d;
+ __m128d_out = __lsx_vffint_d_lu (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffint_d_lu (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffint_d_lu (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vffint_d_lu (__m128i_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vffint_s_wu (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000001600000016;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000001600000016;
+ *((int *)&__m128_result[3]) = 0x41b00000;
+ *((int *)&__m128_result[2]) = 0x41b00000;
+ *((int *)&__m128_result[1]) = 0x41b00000;
+ *((int *)&__m128_result[0]) = 0x41b00000;
+ __m128_out = __lsx_vffint_s_wu (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffffffff;
+ *((int *)&__m128_result[3]) = 0x4f800000;
+ *((int *)&__m128_result[2]) = 0x4f800000;
+ *((int *)&__m128_result[1]) = 0x4f800000;
+ *((int *)&__m128_result[0]) = 0x4f800000;
+ __m128_out = __lsx_vffint_s_wu (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000442800007b50;
+ *((unsigned long *)&__m128i_op0[0]) = 0xffffffffffff0204;
+ *((int *)&__m128_result[3]) = 0x46885000;
+ *((int *)&__m128_result[2]) = 0x46f6a000;
+ *((int *)&__m128_result[1]) = 0x4f800000;
+ *((int *)&__m128_result[0]) = 0x4f7fff02;
+ __m128_out = __lsx_vffint_s_wu (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vffint_s_wu (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((unsigned long *)&__m128i_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_op0[0]) = 0x0000000000000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vffint_s_wu (__m128i_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfrint_d.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfrint_d.c
new file mode 100644
index 000000000..c60ff2b46
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfrint_d.c
@@ -0,0 +1,230 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+/* { dg-timeout 500 } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+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;
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrint_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0003000300030003;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0003000700020005;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrint_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x7fff7fff7fff7fff;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x7fff7fff7fff7fff;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrint_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x7ff0000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x7ff0000000000000;
+ __m128d_out = __lsx_vfrint_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x00ff000100ff00fe;
+ *((unsigned long *)&__m128d_op0[0]) = 0x00ff003000ff00a0;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrint_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xfd200ed2fd370775;
+ *((unsigned long *)&__m128d_op0[0]) = 0x96198318780e32c5;
+ *((unsigned long *)&__m128d_result[1]) = 0xfd200ed2fd370775;
+ *((unsigned long *)&__m128d_result[0]) = 0x8000000000000000;
+ __m128d_out = __lsx_vfrint_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrne_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xe0404041e0404041;
+ *((unsigned long *)&__m128d_op0[0]) = 0xe0404041e0404041;
+ *((unsigned long *)&__m128d_result[1]) = 0xe0404041e0404041;
+ *((unsigned long *)&__m128d_result[0]) = 0xe0404041e0404041;
+ __m128d_out = __lsx_vfrintrne_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000080800000808;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000080800000808;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrne_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_result[0]) = 0xffffffffffffffff;
+ __m128d_out = __lsx_vfrintrne_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000868686868686;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrne_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrp_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000002000;
+ *((unsigned long *)&__m128d_op0[0]) = 0xfffc002000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x3ff0000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0xfffc002000000000;
+ __m128d_out = __lsx_vfrintrp_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x9c9c9c9c00000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x8000000000000000;
+ __m128d_out = __lsx_vfrintrp_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x00007fff00007fff;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x3ff0000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrp_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000007f00ff00ff;
+ *((unsigned long *)&__m128d_op0[0]) = 0x00ff00ff00ff00ff;
+ *((unsigned long *)&__m128d_result[1]) = 0x3ff0000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x3ff0000000000000;
+ __m128d_out = __lsx_vfrintrp_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000077af9450;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x3ff0000000000000;
+ __m128d_out = __lsx_vfrintrp_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xff02ff1bff02ff23;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000ffffff02fff4;
+ *((unsigned long *)&__m128d_result[1]) = 0xff02ff1bff02ff23;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrm_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrm_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128d_op0[0]) = 0x6a57a30ff0000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x6a57a30ff0000000;
+ __m128d_out = __lsx_vfrintrm_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000001300000013;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrm_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_result[0]) = 0xffffffffffffffff;
+ __m128d_out = __lsx_vfrintrm_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffffffff02000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x1f81e3779b97f4a8;
+ *((unsigned long *)&__m128d_result[1]) = 0xffffffff02000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrm_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0001000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0001000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrm_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrz_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x98ff98ff220e220d;
+ *((unsigned long *)&__m128d_op0[0]) = 0xa2e1a2601ff01ff0;
+ *((unsigned long *)&__m128d_result[1]) = 0x8000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x8000000000000000;
+ __m128d_out = __lsx_vfrintrz_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000004;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrz_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x00000000abba7980;
+ *((unsigned long *)&__m128d_op0[0]) = 0x00000000ccf98000;
+ *((unsigned long *)&__m128d_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrz_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xfe3bfb01fe3bfe01;
+ *((unsigned long *)&__m128d_op0[0]) = 0xfe03fe3ffe01fa21;
+ *((unsigned long *)&__m128d_result[1]) = 0xfe3bfb01fe3bfe01;
+ *((unsigned long *)&__m128d_result[0]) = 0xfe03fe3ffe01fa21;
+ __m128d_out = __lsx_vfrintrz_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x5847b72626ce61ef;
+ *((unsigned long *)&__m128d_op0[0]) = 0x110053f401e7cced;
+ *((unsigned long *)&__m128d_result[1]) = 0x5847b72626ce61ef;
+ *((unsigned long *)&__m128d_result[0]) = 0x0000000000000000;
+ __m128d_out = __lsx_vfrintrz_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128d_result, __m128d_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfrint_s.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfrint_s.c
new file mode 100644
index 000000000..12cb02303
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfrint_s.c
@@ -0,0 +1,350 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+/* { dg-timeout 500 } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+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]) = 0x00100010;
+ *((int *)&__m128_op0[2]) = 0x00030000;
+ *((int *)&__m128_op0[1]) = 0x00060002;
+ *((int *)&__m128_op0[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_vfrint_s (__m128_op0);
+ 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_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrint_s (__m128_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000001;
+ *((int *)&__m128_op0[2]) = 0xca02f854;
+ *((int *)&__m128_op0[1]) = 0x00000001;
+ *((int *)&__m128_op0[0]) = 0x00013fa0;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0xca02f854;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrint_s (__m128_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x000000ad;
+ *((int *)&__m128_op0[2]) = 0x00007081;
+ *((int *)&__m128_op0[1]) = 0x00000351;
+ *((int *)&__m128_op0[0]) = 0x0000b5f2;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrint_s (__m128_op0);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x00ff00ef;
+ *((int *)&__m128_op0[2]) = 0x00ff010f;
+ *((int *)&__m128_op0[1]) = 0x00ff00ff;
+ *((int *)&__m128_op0[0]) = 0x00ff010f;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrint_s (__m128_op0);
+ 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_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrintrne_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x00130013;
+ *((int *)&__m128_op0[2]) = 0x00130013;
+ *((int *)&__m128_op0[1]) = 0x00130013;
+ *((int *)&__m128_op0[0]) = 0x00130013;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrintrne_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x20202020;
+ *((int *)&__m128_op0[2]) = 0x20202020;
+ *((int *)&__m128_op0[1]) = 0x20202020;
+ *((int *)&__m128_op0[0]) = 0x20207fff;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrintrne_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x01f50000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrintrne_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((int *)&__m128_result[3]) = 0xffffffff;
+ *((int *)&__m128_result[2]) = 0xffffffff;
+ *((int *)&__m128_result[1]) = 0xffffffff;
+ *((int *)&__m128_result[0]) = 0xffffffff;
+ __m128_out = __lsx_vfrintrne_s (__m128_op0);
+ ASSERTEQ_64 (__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_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrintrne_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00020004;
+ *((int *)&__m128_op0[0]) = 0x00000001;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrintrne_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0xfffbfffb;
+ *((int *)&__m128_op0[2]) = 0xfffbfffb;
+ *((int *)&__m128_op0[1]) = 0xfffbfffb;
+ *((int *)&__m128_op0[0]) = 0xfffbfffb;
+ *((int *)&__m128_result[3]) = 0xfffbfffb;
+ *((int *)&__m128_result[2]) = 0xfffbfffb;
+ *((int *)&__m128_result[1]) = 0xfffbfffb;
+ *((int *)&__m128_result[0]) = 0xfffbfffb;
+ __m128_out = __lsx_vfrintrne_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x0ff780a1;
+ *((int *)&__m128_op0[2]) = 0x0efc01af;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0xfe7f0000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0xfe7f0000;
+ __m128_out = __lsx_vfrintrne_s (__m128_op0);
+ ASSERTEQ_64 (__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_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrintrp_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0xefffffff;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0xefffffff;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrintrp_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffff00;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffff00;
+ *((int *)&__m128_result[3]) = 0xffffffff;
+ *((int *)&__m128_result[2]) = 0xffffff00;
+ *((int *)&__m128_result[1]) = 0xffffffff;
+ *((int *)&__m128_result[0]) = 0xffffff00;
+ __m128_out = __lsx_vfrintrp_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffb96b;
+ *((int *)&__m128_op0[2]) = 0xffff57c9;
+ *((int *)&__m128_op0[1]) = 0xffff6080;
+ *((int *)&__m128_op0[0]) = 0xffff4417;
+ *((int *)&__m128_result[3]) = 0xffffb96b;
+ *((int *)&__m128_result[2]) = 0xffff57c9;
+ *((int *)&__m128_result[1]) = 0xffff6080;
+ *((int *)&__m128_result[0]) = 0xffff4417;
+ __m128_out = __lsx_vfrintrp_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x00ff00ff;
+ *((int *)&__m128_op0[2]) = 0x00ff00ff;
+ *((int *)&__m128_op0[1]) = 0x62cbf96e;
+ *((int *)&__m128_op0[0]) = 0x4acfaf40;
+ *((int *)&__m128_result[3]) = 0x3f800000;
+ *((int *)&__m128_result[2]) = 0x3f800000;
+ *((int *)&__m128_result[1]) = 0x62cbf96e;
+ *((int *)&__m128_result[0]) = 0x4acfaf40;
+ __m128_out = __lsx_vfrintrp_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00002000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x1fe02000;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x3f800000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x3f800000;
+ __m128_out = __lsx_vfrintrp_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((int *)&__m128_result[3]) = 0xffffffff;
+ *((int *)&__m128_result[2]) = 0xffffffff;
+ *((int *)&__m128_result[1]) = 0xffffffff;
+ *((int *)&__m128_result[0]) = 0xffffffff;
+ __m128_out = __lsx_vfrintrp_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x63636363;
+ *((int *)&__m128_op0[2]) = 0x63abdf16;
+ *((int *)&__m128_op0[1]) = 0x41f8e080;
+ *((int *)&__m128_op0[0]) = 0x16161198;
+ *((int *)&__m128_result[3]) = 0x63636363;
+ *((int *)&__m128_result[2]) = 0x63abdf16;
+ *((int *)&__m128_result[1]) = 0x42000000;
+ *((int *)&__m128_result[0]) = 0x3f800000;
+ __m128_out = __lsx_vfrintrp_s (__m128_op0);
+ ASSERTEQ_64 (__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_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrintrm_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0xa5c4c774;
+ *((int *)&__m128_op0[2]) = 0x856ba83b;
+ *((int *)&__m128_op0[1]) = 0x8003caef;
+ *((int *)&__m128_op0[0]) = 0x54691124;
+ *((int *)&__m128_result[3]) = 0xbf800000;
+ *((int *)&__m128_result[2]) = 0xbf800000;
+ *((int *)&__m128_result[1]) = 0xbf800000;
+ *((int *)&__m128_result[0]) = 0x54691124;
+ __m128_out = __lsx_vfrintrm_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00010002;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xff960015;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0xffffffff;
+ *((int *)&__m128_result[0]) = 0xffd60015;
+ __m128_out = __lsx_vfrintrm_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0x3c992b2e;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffff730f;
+ *((int *)&__m128_result[3]) = 0xffffffff;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0xffffffff;
+ *((int *)&__m128_result[0]) = 0xffff730f;
+ __m128_out = __lsx_vfrintrz_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000001;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000016;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrintrz_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x18171615;
+ *((int *)&__m128_op0[2]) = 0x17161514;
+ *((int *)&__m128_op0[1]) = 0x16151413;
+ *((int *)&__m128_op0[0]) = 0x15141312;
+ *((int *)&__m128_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrintrz_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ *((int *)&__m128_op0[3]) = 0x62cbf96e;
+ *((int *)&__m128_op0[2]) = 0x4acfaf40;
+ *((int *)&__m128_op0[1]) = 0xf0bc9a52;
+ *((int *)&__m128_op0[0]) = 0x78285a4a;
+ *((int *)&__m128_result[3]) = 0x62cbf96e;
+ *((int *)&__m128_result[2]) = 0x4acfaf40;
+ *((int *)&__m128_result[1]) = 0xf0bc9a52;
+ *((int *)&__m128_result[0]) = 0x78285a4a;
+ __m128_out = __lsx_vfrintrz_s (__m128_op0);
+ ASSERTEQ_64 (__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_result[3]) = 0x00000000;
+ *((int *)&__m128_result[2]) = 0x00000000;
+ *((int *)&__m128_result[1]) = 0x00000000;
+ *((int *)&__m128_result[0]) = 0x00000000;
+ __m128_out = __lsx_vfrintrz_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-1.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-1.c
new file mode 100644
index 000000000..8d0d56632
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-1.c
@@ -0,0 +1,349 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+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;
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x000000017fff9000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000210011084;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x000000000000040d;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0008000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x00ff000000ff0000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x004f1fcfd01f9f9f;
+ *((unsigned long *)&__m128d_op0[0]) = 0x9f4fcfcfcf800000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0001000100010001;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0001000100010001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x9c7c266e3faa293c;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x00007fff00007fff;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x000000ffffffffff;
+ *((unsigned long *)&__m128d_op0[0]) = 0xffffff0000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000015d926c7;
+ *((unsigned long *)&__m128d_op0[0]) = 0x000000000000e41b;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vftintrp_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000777777777777;
+ *((unsigned long *)&__m128d_op0[0]) = 0xffff7777ffff7777;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vftintrp_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000004000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0080000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0xf4b6f3f52f4ef4a8;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x8000000000000000;
+ __m128i_out = __lsx_vftintrm_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0101010101010101;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xff80ffffffffff80;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000ff80ffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x8000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x00000000b5207f80;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffff007f00000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0xffff007f00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xbff0000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0xc0f3fa0080000000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffffffffffec060;
+ __m128i_out = __lsx_vftintrz_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000ebd20000714f;
+ *((unsigned long *)&__m128d_op0[0]) = 0x00012c8a0000a58a;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_l_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-2.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-2.c
new file mode 100644
index 000000000..5dba807f6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-2.c
@@ -0,0 +1,695 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+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;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00d4ccb8;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00124888;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xfff00000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0xfff00000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x80000000;
+ *((int *)&__m128_op0[2]) = 0xffffd860;
+ *((int *)&__m128_op0[1]) = 0x7fffffff;
+ *((int *)&__m128_op0[0]) = 0x80000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00008000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00008000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xff80ffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0x7ffffffe;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x4f804f80;
+ *((int *)&__m128_op0[0]) = 0x4f804f80;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x0000007b;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000600;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x3f800000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x04870ba0;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00009c7c;
+ *((int *)&__m128_op0[0]) = 0x00007176;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x0667ae56;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000020;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftinth_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrnel_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrnel_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x887c8beb;
+ *((int *)&__m128_op0[2]) = 0x969e00f2;
+ *((int *)&__m128_op0[1]) = 0x101f8b68;
+ *((int *)&__m128_op0[0]) = 0x0b6f8095;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrnel_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00020000;
+ *((int *)&__m128_op0[2]) = 0x00020000;
+ *((int *)&__m128_op0[1]) = 0x000001fc;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrnel_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrnel_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrnel_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrnel_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00020000;
+ *((int *)&__m128_op0[0]) = 0xffff0001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrnel_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x0a752a55;
+ *((int *)&__m128_op0[1]) = 0x0a753500;
+ *((int *)&__m128_op0[0]) = 0xa9fa0d06;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrnel_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrpl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x7fffffff;
+ *((int *)&__m128_op0[2]) = 0x7fffffff;
+ *((int *)&__m128_op0[1]) = 0x7fffffff;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrpl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x000d0254;
+ *((int *)&__m128_op0[2]) = 0x0000007e;
+ *((int *)&__m128_op0[1]) = 0x00000014;
+ *((int *)&__m128_op0[0]) = 0x00140014;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vftintrpl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrpl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x39412488;
+ *((int *)&__m128_op0[0]) = 0x80000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrpl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrpl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000014;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000014;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vftintrpl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00010001;
+ *((int *)&__m128_op0[2]) = 0x00010001;
+ *((int *)&__m128_op0[1]) = 0x00010001;
+ *((int *)&__m128_op0[0]) = 0x00010001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vftintrpl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrpl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrpl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x2e34594c;
+ *((int *)&__m128_op0[0]) = 0x3b000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vftintrpl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrml_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrml_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0x7ffffffe;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrml_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00010001;
+ *((int *)&__m128_op0[2]) = 0x00010001;
+ *((int *)&__m128_op0[1]) = 0x00010001;
+ *((int *)&__m128_op0[0]) = 0x00010001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrml_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x7ff000ff;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrml_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrml_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00ff00ff;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrzl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrzl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrzl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrzl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xfffefffe;
+ *((int *)&__m128_op0[2]) = 0xfffeffff;
+ *((int *)&__m128_op0[1]) = 0xfffefffe;
+ *((int *)&__m128_op0[0]) = 0xfffeffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrzl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrzl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x0000033a;
+ *((int *)&__m128_op0[2]) = 0x0bde0853;
+ *((int *)&__m128_op0[1]) = 0x0a960e6b;
+ *((int *)&__m128_op0[0]) = 0x0a4f0000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrzl_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0x7ffffffe;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrneh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0xfffffffe;
+ *((int *)&__m128_op0[0]) = 0x00000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrneh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrneh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000001;
+ *((int *)&__m128_op0[2]) = 0x7ffeffff;
+ *((int *)&__m128_op0[1]) = 0x00000001;
+ *((int *)&__m128_op0[0]) = 0x7ffeffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrneh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrneh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrneh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x80808080;
+ *((int *)&__m128_op0[0]) = 0x80638063;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrph_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrph_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000080;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vftintrph_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrph_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x80000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrmh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrmh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00ff00ff;
+ *((int *)&__m128_op0[2]) = 0x00ff00ff;
+ *((int *)&__m128_op0[1]) = 0x62cbf96e;
+ *((int *)&__m128_op0[0]) = 0x4acfaf40;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrmh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0x0000ac26;
+ *((int *)&__m128_op0[1]) = 0x00ff0000;
+ *((int *)&__m128_op0[0]) = 0x00000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrmh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x6420e020;
+ *((int *)&__m128_op0[2]) = 0x8400c4e3;
+ *((int *)&__m128_op0[1]) = 0x20c4e0c4;
+ *((int *)&__m128_op0[0]) = 0xe0da6499;
+ *((unsigned long *)&__m128i_result[1]) = 0x7fffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrzh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xfbffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0x7bffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x8000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrzh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x18171615;
+ *((int *)&__m128_op0[2]) = 0x17161514;
+ *((int *)&__m128_op0[1]) = 0x16151413;
+ *((int *)&__m128_op0[0]) = 0x15141312;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrzh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrzh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x046a09ec;
+ *((int *)&__m128_op0[0]) = 0x009c0000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrzh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrzh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x4f4f4f4f;
+ *((int *)&__m128_op0[2]) = 0x4f4f4f4f;
+ *((int *)&__m128_op0[1]) = 0x4f4f4f4f;
+ *((int *)&__m128_op0[0]) = 0x4f4f4f4f;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000cf4f4f00;
+ *((unsigned long *)&__m128i_result[0]) = 0x00000000cf4f4f00;
+ __m128i_out = __lsx_vftintrzh_l_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-3.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-3.c
new file mode 100644
index 000000000..7f6d2f4d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-3.c
@@ -0,0 +1,1028 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+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;
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x52527d7d52527d7d;
+ *((unsigned long *)&__m128d_op1[0]) = 0x52527d7d52527d7d;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7fffffff7fffffff;
+ __m128i_out = __lsx_vftint_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x0000ffff;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x0000ffff;
+ *((int *)&__m128_op0[0]) = 0x0000ffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000001;
+ *((int *)&__m128_op0[2]) = 0xfffffffe;
+ *((int *)&__m128_op0[1]) = 0x00000001;
+ *((int *)&__m128_op0[0]) = 0xfffffffe;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00040100;
+ *((int *)&__m128_op0[1]) = 0x00010001;
+ *((int *)&__m128_op0[0]) = 0x00010000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x0000ffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xfffffffffffff800;
+ *((unsigned long *)&__m128d_op0[0]) = 0x8000000080000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0xffffffff00000080;
+ *((unsigned long *)&__m128d_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000001;
+ *((int *)&__m128_op0[2]) = 0xfffffffe;
+ *((int *)&__m128_op0[1]) = 0x00000001;
+ *((int *)&__m128_op0[0]) = 0xfffffffe;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000e0180000e810;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000f0080000f800;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000e0180000e810;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000f0080000f800;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffd30000;
+ *((int *)&__m128_op0[2]) = 0x00130000;
+ *((int *)&__m128_op0[1]) = 0xffd30000;
+ *((int *)&__m128_op0[0]) = 0x00130000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x7ff8000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xe1000000;
+ *((int *)&__m128_op0[2]) = 0x4deb2610;
+ *((int *)&__m128_op0[1]) = 0xe101e001;
+ *((int *)&__m128_op0[0]) = 0x4dec4089;
+ *((unsigned long *)&__m128i_result[1]) = 0x800000001d64c200;
+ *((unsigned long *)&__m128i_result[0]) = 0x800000001d881120;
+ __m128i_out = __lsx_vftint_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000ffffffffffff;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000ffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x76f42488;
+ *((int *)&__m128_op0[0]) = 0x80000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7fffffff00000000;
+ __m128i_out = __lsx_vftint_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x0000001f;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op1[0]) = 0x9c9c9c9c9c9c9c9c;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0202f5f80000ff00;
+ *((unsigned long *)&__m128d_op1[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128d_op1[0]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x003fffc0;
+ *((int *)&__m128_op0[2]) = 0xffc0003f;
+ *((int *)&__m128_op0[1]) = 0xffc0ffc0;
+ *((int *)&__m128_op0[0]) = 0x003f003f;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffffff7fffffffff;
+ *((unsigned long *)&__m128d_op0[0]) = 0xffffff8000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x42652524;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000003900000000;
+ __m128i_out = __lsx_vftintrne_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xff00ff7f;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x8000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0x7f800000;
+ *((int *)&__m128_op0[1]) = 0x2d1da85b;
+ *((int *)&__m128_op0[0]) = 0x7f800000;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000007fffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x000000007fffffff;
+ __m128i_out = __lsx_vftintrne_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x7f8000007f800000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x7f8000007f800000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7fffffff7fffffff;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x80307028;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0x8040007f;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x00000000fefefe6a;
+ *((unsigned long *)&__m128d_op0[0]) = 0x00000000c2bac2c2;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x000000002bfd9461;
+ *((unsigned long *)&__m128d_op1[1]) = 0x000000004fc04f81;
+ *((unsigned long *)&__m128d_op1[0]) = 0x000000004fc04f80;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x000000000000001f;
+ *((unsigned long *)&__m128d_op0[0]) = 0x000000000000001f;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000003a0000003a;
+ *((unsigned long *)&__m128d_op1[1]) = 0x37c0001000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x37c0001000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000068;
+ *((unsigned long *)&__m128d_op1[1]) = 0x6363636363636363;
+ *((unsigned long *)&__m128d_op1[0]) = 0x6363636363636363;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7fffffff7fffffff;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x4429146a7b4c88b2;
+ *((unsigned long *)&__m128d_op0[0]) = 0xe22b3595efa4aa0c;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x7fffffff80000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0001000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000400000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x00000000fffffff5;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x7fffffff7fffffff;
+ *((unsigned long *)&__m128d_op0[0]) = 0x7fffffff7fffffff;
+ *((unsigned long *)&__m128d_op1[1]) = 0xe7e5560400010001;
+ *((unsigned long *)&__m128d_op1[0]) = 0xe7e5dabf00010001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x8000000080000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x03050302;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x03010302;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000600007fff;
+ *((unsigned long *)&__m128d_op0[0]) = 0x00000008ffffa209;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x046a09ec009c0000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x000aa822;
+ *((int *)&__m128_op0[2]) = 0xa79308f6;
+ *((int *)&__m128_op0[1]) = 0x03aa355e;
+ *((int *)&__m128_op0[0]) = 0x1d37b5a1;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffff00;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffff0000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrne_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00001802;
+ *((int *)&__m128_op0[0]) = 0x041b0013;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000100000001;
+ __m128i_out = __lsx_vftintrp_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x004200a000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x004200a000200000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000fe00ff;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000ffff0000ffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000001;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0001000100010001;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0001000101fd01fe;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000c2f90000bafa;
+ *((unsigned long *)&__m128d_op1[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128d_op1[0]) = 0x00000000fffff800;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000100000001;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xff80ffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0x7ffffffe;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0101080408040804;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0804080407040804;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0101080408040804;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0804080407040804;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000100000001;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00010001;
+ *((int *)&__m128_op0[2]) = 0x00010001;
+ *((int *)&__m128_op0[1]) = 0x00010001;
+ *((int *)&__m128_op0[0]) = 0x00010001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000100000001;
+ __m128i_out = __lsx_vftintrp_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x00000003ffda00f3;
+ *((unsigned long *)&__m128d_op0[0]) = 0x00000003ffda00f3;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xfffffadf;
+ *((int *)&__m128_op0[2]) = 0xfedbfefe;
+ *((int *)&__m128_op0[1]) = 0x5f5f7bfe;
+ *((int *)&__m128_op0[0]) = 0xdefb5ada;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000080000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x7fffffff80000000;
+ __m128i_out = __lsx_vftintrp_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffa6ff91fdd8ef77;
+ *((unsigned long *)&__m128d_op0[0]) = 0x061202bffb141c38;
+ *((unsigned long *)&__m128d_op1[1]) = 0xfefffffffed08f77;
+ *((unsigned long *)&__m128d_op1[0]) = 0x8160cdd2f365ed0d;
+ *((unsigned long *)&__m128i_result[1]) = 0x8000000000000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x8000000000000000;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000001;
+ *((int *)&__m128_op0[2]) = 0x084314a6;
+ *((int *)&__m128_op0[1]) = 0x00000001;
+ *((int *)&__m128_op0[0]) = 0x084314a6;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000100000001;
+ __m128i_out = __lsx_vftintrp_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x3f413f4100000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x7f801fe000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op1[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000017fffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xfe3bfb01fe3bfe01;
+ *((unsigned long *)&__m128d_op0[0]) = 0xfe03fe3ffe01fa21;
+ *((unsigned long *)&__m128d_op1[1]) = 0xfe3bfb01fe3bfe01;
+ *((unsigned long *)&__m128d_op1[0]) = 0xfe03fe3ffe01fa21;
+ *((unsigned long *)&__m128i_result[1]) = 0x8000000080000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x8000000080000000;
+ __m128i_out = __lsx_vftintrp_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x3a800000;
+ *((int *)&__m128_op0[2]) = 0x3a800000;
+ *((int *)&__m128_op0[1]) = 0x000ef000;
+ *((int *)&__m128_op0[0]) = 0x0000003b;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000100000001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000100000001;
+ __m128i_out = __lsx_vftintrp_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x10404000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x09610001;
+ *((int *)&__m128_op0[0]) = 0x00000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x0000001a;
+ *((int *)&__m128_op0[2]) = 0xfffffff7;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0800080008000800;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0800080008000800;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x000000000202fe02;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128d_op1[0]) = 0xffff00fc0000ff02;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00040004;
+ *((int *)&__m128_op0[2]) = 0x00040004;
+ *((int *)&__m128_op0[1]) = 0x00040004;
+ *((int *)&__m128_op0[0]) = 0x00040004;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00ffff00;
+ *((int *)&__m128_op0[2]) = 0xff00ff00;
+ *((int *)&__m128_op0[1]) = 0x00ffff00;
+ *((int *)&__m128_op0[0]) = 0xff00ff00;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000080000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000080000000;
+ __m128i_out = __lsx_vftintrm_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x013ec13e;
+ *((int *)&__m128_op0[1]) = 0xc03fc03f;
+ *((int *)&__m128_op0[0]) = 0xc0ff00ff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xfffffffdfffffff8;
+ __m128i_out = __lsx_vftintrm_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x7fffffff7ffffffb;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000ff00ff;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000ff00ff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x43800000;
+ *((int *)&__m128_op0[0]) = 0x43800000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000010000000100;
+ __m128i_out = __lsx_vftintrm_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000014;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000014;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrm_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000017fda829;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x8000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xfffffff7;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x80307028ffffffff;
+ *((unsigned long *)&__m128d_op0[0]) = 0x8040007fffffffff;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xff84fff4;
+ *((int *)&__m128_op0[2]) = 0xff84fff4;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xfffffff0;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x7fff0007e215b122;
+ *((unsigned long *)&__m128d_op1[0]) = 0x7ffeffff7bfff828;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x07ffc000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0xffff0000;
+ *((int *)&__m128_op0[0]) = 0x0000ffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000158;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000158;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xf039b8c0;
+ *((int *)&__m128_op0[2]) = 0xc61e81ef;
+ *((int *)&__m128_op0[1]) = 0x6db7da53;
+ *((int *)&__m128_op0[0]) = 0xfbd2e34b;
+ *((unsigned long *)&__m128i_result[1]) = 0x80000000ffffd860;
+ *((unsigned long *)&__m128i_result[0]) = 0x7fffffff80000000;
+ __m128i_out = __lsx_vftintrz_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00020000;
+ *((int *)&__m128_op0[0]) = 0xffff0001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00027113;
+ *((int *)&__m128_op0[2]) = 0x50a27112;
+ *((int *)&__m128_op0[1]) = 0x00d57017;
+ *((int *)&__m128_op0[0]) = 0x94027113;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000007fffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xff80ff80;
+ *((int *)&__m128_op0[2]) = 0x7e017f01;
+ *((int *)&__m128_op0[1]) = 0x7f3b7f3f;
+ *((int *)&__m128_op0[0]) = 0x7f3b7f21;
+ *((unsigned long *)&__m128i_result[1]) = 0x000000007fffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x7fffffff7fffffff;
+ __m128i_out = __lsx_vftintrz_w_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffffffffffffffee;
+ *((unsigned long *)&__m128d_op0[0]) = 0x00000000011ff040;
+ *((unsigned long *)&__m128d_op1[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op1[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op0[0]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128d_op1[1]) = 0x00000000047fe2f0;
+ *((unsigned long *)&__m128d_op1[0]) = 0x00000000047fe2f0;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_w_d (__m128d_op0, __m128d_op1);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-4.c b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-4.c
new file mode 100644
index 000000000..9c5bb9131
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-4.c
@@ -0,0 +1,345 @@
+/* { dg-do run } */
+/* { dg-options "-mlsx -w -fno-strict-aliasing" } */
+#include "../simd_correctness_check.h"
+#include <lsxintrin.h>
+
+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]) = 0x0000c77c;
+ *((int *)&__m128_op0[2]) = 0x000047cd;
+ *((int *)&__m128_op0[1]) = 0x0000c0f1;
+ *((int *)&__m128_op0[0]) = 0x00006549;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0xffffffff;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0xffffffff;
+ *((int *)&__m128_op0[0]) = 0xfffffff0;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0xffffffff;
+ *((int *)&__m128_op0[2]) = 0x00000001;
+ *((int *)&__m128_op0[1]) = 0xffffffee;
+ *((int *)&__m128_op0[0]) = 0x00000004;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x0000ffff;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x63636363;
+ *((int *)&__m128_op0[2]) = 0x63636363;
+ *((int *)&__m128_op0[1]) = 0x63636363;
+ *((int *)&__m128_op0[0]) = 0x63636363;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffffffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vftint_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0xfffffffe;
+ *((int *)&__m128_op0[0]) = 0xffffffff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x02020004;
+ *((int *)&__m128_op0[2]) = 0x02020202;
+ *((int *)&__m128_op0[1]) = 0x00002000;
+ *((int *)&__m128_op0[0]) = 0x00010000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x7fff7fff;
+ *((int *)&__m128_op0[2]) = 0x7fff7fff;
+ *((int *)&__m128_op0[1]) = 0x00000001;
+ *((int *)&__m128_op0[0]) = 0x0000003f;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x000000ff;
+ *((int *)&__m128_op0[2]) = 0x808000ff;
+ *((int *)&__m128_op0[1]) = 0x000000ff;
+ *((int *)&__m128_op0[0]) = 0x808000ff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x7f7f7f7f;
+ *((int *)&__m128_op0[1]) = 0x00000001;
+ *((int *)&__m128_op0[0]) = 0x00000010;
+ *((unsigned long *)&__m128i_result[1]) = 0x00000000ffffffff;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00002000;
+ *((int *)&__m128_op0[2]) = 0x00002000;
+ *((int *)&__m128_op0[1]) = 0x10000000;
+ *((int *)&__m128_op0[0]) = 0x10000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000001;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x67eb85af;
+ *((int *)&__m128_op0[2]) = 0xb2ebb000;
+ *((int *)&__m128_op0[1]) = 0xc8847ef6;
+ *((int *)&__m128_op0[0]) = 0xed3f2000;
+ *((unsigned long *)&__m128i_result[1]) = 0xffffffff00000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((int *)&__m128_op0[3]) = 0x00000000;
+ *((int *)&__m128_op0[2]) = 0x00000000;
+ *((int *)&__m128_op0[1]) = 0x00000000;
+ *((int *)&__m128_op0[0]) = 0x00000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_wu_s (__m128_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000400000004000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000400000007004;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x3c600000ff800000;
+ *((unsigned long *)&__m128d_op0[0]) = 0xfffffffffffffffe;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x6a57a30ff0000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0xffffffffffffffff;
+ __m128i_out = __lsx_vftint_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x40f0001000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x40f0001000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000010001;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000010001;
+ __m128i_out = __lsx_vftint_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000005;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000014;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000014;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x3a8000003a800000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x000ef0000000003b;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x000000009c83e21a;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000022001818;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftint_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000800000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0080000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0080000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000001;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000001;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x800000001d64c200;
+ *((unsigned long *)&__m128d_op0[0]) = 0x800000001d881120;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x00000000f0009d3c;
+ *((unsigned long *)&__m128d_op0[0]) = 0x000000016fff9dff;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000040a04000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000040a04000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x8000800080008000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x8000800080008000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ *((unsigned long *)&__m128d_op0[1]) = 0x0001000000000000;
+ *((unsigned long *)&__m128d_op0[0]) = 0x03fc03fc03fc03fc;
+ *((unsigned long *)&__m128i_result[1]) = 0x0000000000000000;
+ *((unsigned long *)&__m128i_result[0]) = 0x0000000000000000;
+ __m128i_out = __lsx_vftintrz_lu_d (__m128d_op0);
+ ASSERTEQ_64 (__LINE__, __m128i_result, __m128i_out);
+
+ return 0;
+}
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。