aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorchenxiaolong <chenxiaolong@loongson.cn>2024-03-06 16:54:06 +0800
committerLulu Cheng <chenglulu@loongson.cn>2024-03-07 16:34:57 +0800
commitae1b05641ccf1cd4739b0998ce61cda6e5b772dd (patch)
tree2ce1ef846adc3ba16133fefd62ce6179fde69439 /gcc/system.h
parent2f7d4728dbfd976788f77b8f43d4dc3c718b71b7 (diff)
downloadgcc-ae1b05641ccf1cd4739b0998ce61cda6e5b772dd.zip
gcc-ae1b05641ccf1cd4739b0998ce61cda6e5b772dd.tar.gz
gcc-ae1b05641ccf1cd4739b0998ce61cda6e5b772dd.tar.bz2
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.
Diffstat (limited to 'gcc/system.h')
0 files changed, 0 insertions, 0 deletions