23 Star 30 Fork 165

src-openEuler/gcc
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0144-LoongArch-testsuite-Fix-problems-with-incorrect-resu.patch 22.37 KB
一键复制 编辑 原始数据 按行查看 历史
ticat_fp 提交于 2024-10-31 10:33 +08:00 . LoongArch: Sync to upstream
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
From 2170e0e811cb1b592f7577571f10b5ab95da9eaa Mon Sep 17 00:00:00 2001
From: chenxiaolong <chenxiaolong@loongson.cn>
Date: Fri, 25 Oct 2024 06:05:59 +0000
Subject: [PATCH 144/188] LoongArch: testsuite:Fix problems with incorrect
results in vector test cases.
In simd_correctness_check.h, the role of the macro ASSERTEQ_64 is to check the
result of the passed vector values for the 64-bit data of each array element.
It turns out that it uses the abs() function to check only the lower 32 bits
of the data at a time, so it replaces abs() with the llabs() function.
However, the following two problems may occur after modification:
1.FAIL in lasx-xvfrint_s.c and lsx-vfrint_s.c
The reason for the error is because vector test cases that use __m{128,256} to
define vector types are composed of 32-bit primitive types, they should use
ASSERTEQ_32 instead of ASSERTEQ_64 to check for correctness.
2.FAIL in lasx-xvshuf_b.c and lsx-vshuf.c
The cause of the error is that the expected result of the function setting in
the test case is incorrect.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/vector/lasx/lasx-xvfrint_s.c: Replace
ASSERTEQ_64 with the macro ASSERTEQ_32.
* gcc.target/loongarch/vector/lasx/lasx-xvshuf_b.c: Modify the expected
test results of some functions according to the function of the vector
instruction.
* gcc.target/loongarch/vector/lsx/lsx-vfrint_s.c: Same
modification as lasx-xvfrint_s.c.
* gcc.target/loongarch/vector/lsx/lsx-vshuf.c: Same
modification as lasx-xvshuf_b.c.
* gcc.target/loongarch/vector/simd_correctness_check.h: Use the llabs()
function instead of abs() to check the correctness of the results.
---
.../loongarch/vector/lasx/lasx-xvfrint_s.c | 58 +++++++++----------
.../loongarch/vector/lsx/lsx-vfrint_s.c | 50 ++++++++--------
.../loongarch/vector/simd_correctness_check.h | 2 +-
3 files changed, 55 insertions(+), 55 deletions(-)
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvfrint_s.c b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvfrint_s.c
index fbfe300ea..4538528a6 100644
--- a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvfrint_s.c
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvfrint_s.c
@@ -184,7 +184,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrne_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0xffffffff;
*((int *)&__m256_op0[6]) = 0xffffffff;
@@ -203,7 +203,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrne_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0xffffffff;
*((int *)&__m256_op0[6]) = 0xffffffff;
@@ -222,7 +222,7 @@ main ()
*((int *)&__m256_result[1]) = 0xffffffff;
*((int *)&__m256_result[0]) = 0xffffffff;
__m256_out = __lasx_xvfrintrne_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x01010101;
*((int *)&__m256_op0[6]) = 0x01010101;
@@ -241,7 +241,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrne_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x00000000;
*((int *)&__m256_op0[6]) = 0x00000000;
@@ -260,7 +260,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrne_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0xffffffff;
*((int *)&__m256_op0[6]) = 0xffffffff;
@@ -279,7 +279,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrne_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0xffffffff;
*((int *)&__m256_op0[6]) = 0xffffffff;
@@ -298,7 +298,7 @@ main ()
*((int *)&__m256_result[1]) = 0xffffffff;
*((int *)&__m256_result[0]) = 0xffffffff;
__m256_out = __lasx_xvfrintrne_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x01010101;
*((int *)&__m256_op0[6]) = 0x01010101;
@@ -317,7 +317,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrne_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x55555555;
*((int *)&__m256_op0[6]) = 0x36aaaaac;
@@ -336,7 +336,7 @@ main ()
*((int *)&__m256_result[1]) = 0x55555555;
*((int *)&__m256_result[0]) = 0x80000000;
__m256_out = __lasx_xvfrintrp_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x00000000;
*((int *)&__m256_op0[6]) = 0x00000000;
@@ -355,7 +355,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrp_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0xffffc741;
*((int *)&__m256_op0[6]) = 0x8a023680;
@@ -374,7 +374,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrp_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x00000000;
*((int *)&__m256_op0[6]) = 0xffffffff;
@@ -393,7 +393,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0xffffffff;
__m256_out = __lasx_xvfrintrp_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x00200101;
*((int *)&__m256_op0[6]) = 0x01610000;
@@ -412,7 +412,7 @@ main ()
*((int *)&__m256_result[1]) = 0x3f800000;
*((int *)&__m256_result[0]) = 0x3f800000;
__m256_out = __lasx_xvfrintrp_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x00000000;
*((int *)&__m256_op0[6]) = 0x00000000;
@@ -431,7 +431,7 @@ main ()
*((int *)&__m256_result[1]) = 0xfefefefe;
*((int *)&__m256_result[0]) = 0x3f800000;
__m256_out = __lasx_xvfrintrp_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x1c1c1c1c;
*((int *)&__m256_op0[6]) = 0x1c1c1c1c;
@@ -450,7 +450,7 @@ main ()
*((int *)&__m256_result[1]) = 0xfffffffe;
*((int *)&__m256_result[0]) = 0xffffff00;
__m256_out = __lasx_xvfrintrp_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x00000000;
*((int *)&__m256_op0[6]) = 0x00000000;
@@ -469,7 +469,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrm_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x00000000;
*((int *)&__m256_op0[6]) = 0x00000000;
@@ -488,7 +488,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrm_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0xffffffff;
*((int *)&__m256_op0[6]) = 0xffffffff;
@@ -507,7 +507,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0xffffffff;
__m256_out = __lasx_xvfrintrm_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x5d20a0a1;
*((int *)&__m256_op0[6]) = 0x5d20a0a1;
@@ -526,7 +526,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrm_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x00000000;
*((int *)&__m256_op0[6]) = 0x001d001d;
@@ -545,7 +545,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrm_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x00000000;
*((int *)&__m256_op0[6]) = 0x00000000;
@@ -564,7 +564,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrm_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x00000000;
*((int *)&__m256_op0[6]) = 0x00000000;
@@ -583,7 +583,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrm_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x00000000;
*((int *)&__m256_op0[6]) = 0x00000000;
@@ -602,7 +602,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrz_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0xffffffff;
*((int *)&__m256_op0[6]) = 0xfffffffe;
@@ -621,7 +621,7 @@ main ()
*((int *)&__m256_result[1]) = 0xffffffff;
*((int *)&__m256_result[0]) = 0xfffffffe;
__m256_out = __lasx_xvfrintrz_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x00000000;
*((int *)&__m256_op0[6]) = 0x00000000;
@@ -640,7 +640,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0x00000000;
__m256_out = __lasx_xvfrintrz_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x00000000;
*((int *)&__m256_op0[6]) = 0x00000000;
@@ -659,7 +659,7 @@ main ()
*((int *)&__m256_result[1]) = 0x00000000;
*((int *)&__m256_result[0]) = 0xffffffff;
__m256_out = __lasx_xvfrintrz_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0x80000000;
*((int *)&__m256_op0[6]) = 0x80000000;
@@ -678,7 +678,7 @@ main ()
*((int *)&__m256_result[1]) = 0xffffffff;
*((int *)&__m256_result[0]) = 0xffffffff;
__m256_out = __lasx_xvfrintrz_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0xffffffff;
*((int *)&__m256_op0[6]) = 0xffffffff;
@@ -697,7 +697,7 @@ main ()
*((int *)&__m256_result[1]) = 0xffffffff;
*((int *)&__m256_result[0]) = 0xffffffff;
__m256_out = __lasx_xvfrintrz_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_out);
*((int *)&__m256_op0[7]) = 0xf5fffc00;
*((int *)&__m256_op0[6]) = 0xfc000000;
@@ -716,7 +716,7 @@ main ()
*((int *)&__m256_result[1]) = 0xf5fffc00;
*((int *)&__m256_result[0]) = 0xfc000000;
__m256_out = __lasx_xvfrintrz_s (__m256_op0);
- ASSERTEQ_64 (__LINE__, __m256_result, __m256_out);
+ ASSERTEQ_32 (__LINE__, __m256_result, __m256_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
index 61f28325a..5ba91ee51 100644
--- a/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfrint_s.c
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfrint_s.c
@@ -79,7 +79,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0x00000000;
__m128_out = __lsx_vfrintrne_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x00130013;
*((int *)&__m128_op0[2]) = 0x00130013;
@@ -90,7 +90,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0x00000000;
__m128_out = __lsx_vfrintrne_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x20202020;
*((int *)&__m128_op0[2]) = 0x20202020;
@@ -101,7 +101,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0x00000000;
__m128_out = __lsx_vfrintrne_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x00000000;
*((int *)&__m128_op0[2]) = 0x00000000;
@@ -112,7 +112,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0x00000000;
__m128_out = __lsx_vfrintrne_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0xffffffff;
*((int *)&__m128_op0[2]) = 0xffffffff;
@@ -123,7 +123,7 @@ main ()
*((int *)&__m128_result[1]) = 0xffffffff;
*((int *)&__m128_result[0]) = 0xffffffff;
__m128_out = __lsx_vfrintrne_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x00000000;
*((int *)&__m128_op0[2]) = 0x00000001;
@@ -134,7 +134,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0x00000000;
__m128_out = __lsx_vfrintrne_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x00000000;
*((int *)&__m128_op0[2]) = 0x00000000;
@@ -145,7 +145,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0x00000000;
__m128_out = __lsx_vfrintrne_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0xfffbfffb;
*((int *)&__m128_op0[2]) = 0xfffbfffb;
@@ -156,7 +156,7 @@ main ()
*((int *)&__m128_result[1]) = 0xfffbfffb;
*((int *)&__m128_result[0]) = 0xfffbfffb;
__m128_out = __lsx_vfrintrne_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x0ff780a1;
*((int *)&__m128_op0[2]) = 0x0efc01af;
@@ -167,7 +167,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0xfe7f0000;
__m128_out = __lsx_vfrintrne_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x00000000;
*((int *)&__m128_op0[2]) = 0x00000000;
@@ -178,7 +178,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0x00000000;
__m128_out = __lsx_vfrintrp_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x00000000;
*((int *)&__m128_op0[2]) = 0xefffffff;
@@ -189,7 +189,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0x00000000;
__m128_out = __lsx_vfrintrp_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0xffffffff;
*((int *)&__m128_op0[2]) = 0xffffff00;
@@ -200,7 +200,7 @@ main ()
*((int *)&__m128_result[1]) = 0xffffffff;
*((int *)&__m128_result[0]) = 0xffffff00;
__m128_out = __lsx_vfrintrp_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0xffffb96b;
*((int *)&__m128_op0[2]) = 0xffff57c9;
@@ -211,7 +211,7 @@ main ()
*((int *)&__m128_result[1]) = 0xffff6080;
*((int *)&__m128_result[0]) = 0xffff4417;
__m128_out = __lsx_vfrintrp_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x00ff00ff;
*((int *)&__m128_op0[2]) = 0x00ff00ff;
@@ -222,7 +222,7 @@ main ()
*((int *)&__m128_result[1]) = 0x62cbf96e;
*((int *)&__m128_result[0]) = 0x4acfaf40;
__m128_out = __lsx_vfrintrp_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x00000000;
*((int *)&__m128_op0[2]) = 0x00002000;
@@ -233,7 +233,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0x3f800000;
__m128_out = __lsx_vfrintrp_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0xffffffff;
*((int *)&__m128_op0[2]) = 0xffffffff;
@@ -244,7 +244,7 @@ main ()
*((int *)&__m128_result[1]) = 0xffffffff;
*((int *)&__m128_result[0]) = 0xffffffff;
__m128_out = __lsx_vfrintrp_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x63636363;
*((int *)&__m128_op0[2]) = 0x63abdf16;
@@ -255,7 +255,7 @@ main ()
*((int *)&__m128_result[1]) = 0x42000000;
*((int *)&__m128_result[0]) = 0x3f800000;
__m128_out = __lsx_vfrintrp_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x00000000;
*((int *)&__m128_op0[2]) = 0x00000000;
@@ -266,7 +266,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0x00000000;
__m128_out = __lsx_vfrintrm_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0xa5c4c774;
*((int *)&__m128_op0[2]) = 0x856ba83b;
@@ -277,7 +277,7 @@ main ()
*((int *)&__m128_result[1]) = 0xbf800000;
*((int *)&__m128_result[0]) = 0x54691124;
__m128_out = __lsx_vfrintrm_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x00000000;
*((int *)&__m128_op0[2]) = 0x00010002;
@@ -288,7 +288,7 @@ main ()
*((int *)&__m128_result[1]) = 0xffffffff;
*((int *)&__m128_result[0]) = 0xffd60015;
__m128_out = __lsx_vfrintrm_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0xffffffff;
*((int *)&__m128_op0[2]) = 0x3c992b2e;
@@ -299,7 +299,7 @@ main ()
*((int *)&__m128_result[1]) = 0xffffffff;
*((int *)&__m128_result[0]) = 0xffff730f;
__m128_out = __lsx_vfrintrz_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x00000000;
*((int *)&__m128_op0[2]) = 0x00000001;
@@ -310,7 +310,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0x00000000;
__m128_out = __lsx_vfrintrz_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x18171615;
*((int *)&__m128_op0[2]) = 0x17161514;
@@ -321,7 +321,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0x00000000;
__m128_out = __lsx_vfrintrz_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x62cbf96e;
*((int *)&__m128_op0[2]) = 0x4acfaf40;
@@ -332,7 +332,7 @@ main ()
*((int *)&__m128_result[1]) = 0xf0bc9a52;
*((int *)&__m128_result[0]) = 0x78285a4a;
__m128_out = __lsx_vfrintrz_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
*((int *)&__m128_op0[3]) = 0x00000000;
*((int *)&__m128_op0[2]) = 0x00000000;
@@ -343,7 +343,7 @@ main ()
*((int *)&__m128_result[1]) = 0x00000000;
*((int *)&__m128_result[0]) = 0x00000000;
__m128_out = __lsx_vfrintrz_s (__m128_op0);
- ASSERTEQ_64 (__LINE__, __m128_result, __m128_out);
+ ASSERTEQ_32 (__LINE__, __m128_result, __m128_out);
return 0;
}
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/simd_correctness_check.h b/gcc/testsuite/gcc.target/loongarch/vector/simd_correctness_check.h
index 551340bd5..c1adab586 100644
--- a/gcc/testsuite/gcc.target/loongarch/vector/simd_correctness_check.h
+++ b/gcc/testsuite/gcc.target/loongarch/vector/simd_correctness_check.h
@@ -10,7 +10,7 @@
{ \
long long *temp_ref = (long long *)&ref[i], \
*temp_res = (long long *)&res[i]; \
- if (abs (*temp_ref - *temp_res) > 0) \
+ if (llabs (*temp_ref - *temp_res) > 0) \
{ \
printf (" error: %s at line %ld , expected " #ref \
"[%ld]:0x%016lx, got: 0x%016lx\n", \
--
2.43.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/gcc.git
git@gitee.com:src-openeuler/gcc.git
src-openeuler
gcc
gcc
master

搜索帮助