Projects
openEuler:24.03:SP1:Everything
gcc
_service:tar_scm:0144-LoongArch-testsuite-Fix-p...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:0144-LoongArch-testsuite-Fix-problems-with-incorrect-resu.patch of Package gcc
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
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2