]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
LoongArch: testsuite:Give up the detection of the gcc.dg/fma-{3, 4, 6, 7}.c file.
authorchenxiaolong <chenxiaolong@loongson.cn>
Fri, 5 Jan 2024 03:43:29 +0000 (11:43 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Fri, 5 Jan 2024 12:28:02 +0000 (20:28 +0800)
On the LoongArch architecture, the above four test cases need to be waived
during testing. There are two situations:

1. The function of fma-{3,6}.c test is to find the value of c-a*b, but on
the LoongArch architecture, the function of the existing fnmsub instruction
is to find the value of -(a*b - c);

2. The function of fma-{4,7}.c test is to find the value of -(a*b)-c, but on
the LoongArch architecture, the function of the existing fnmadd instruction
is to find the value of -(a*b + c);

Through the analysis of the above two cases, there will be positive and
negative zero inequality.

gcc/testsuite/ChangeLog

* gcc.dg/fma-3.c: The intermediate file corresponding to the
function does not produce the corresponding FNMA symbol, so the test
rules should be skipped when testing.
* gcc.dg/fma-4.c: The intermediate file corresponding to the
function does not produce the corresponding FNMS symbol, so skip the
test rules when testing.
* gcc.dg/fma-6.c: The cause is the same as fma-3.c.
* gcc.dg/fma-7.c: The cause is the same as fma-4.c

gcc/testsuite/gcc.dg/fma-3.c
gcc/testsuite/gcc.dg/fma-4.c
gcc/testsuite/gcc.dg/fma-6.c
gcc/testsuite/gcc.dg/fma-7.c

index 699aa2c95305a6a509566a81c49dbff6fe014a14..6649b54b6f93b9f94c0adb8eec224acc1d48b485 100644 (file)
@@ -12,4 +12,4 @@ f2 (double a, double b, double c)
   return c - a * b;
 }
 
-/* { dg-final { scan-tree-dump-times { = \.FNMA \(} 2 "widening_mul" { target scalar_all_fma } } } */
+/* { dg-final { scan-tree-dump-times { = \.FNMA \(} 2 "widening_mul" { target { scalar_all_fma && { ! loongarch*-*-* } } } } } */
index bff928f1facd08abf523c8022210632c36d9ae49..f1701c1961a29d1b4d1cc5d8075571d4f588937f 100644 (file)
@@ -12,4 +12,4 @@ f2 (double a, double b, double c)
   return -(a * b) - c;
 }
 
-/* { dg-final { scan-tree-dump-times { = \.FNMS \(} 2 "widening_mul" { target scalar_all_fma } } } */
+/* { dg-final { scan-tree-dump-times { = \.FNMS \(} 2 "widening_mul" { target { scalar_all_fma && { ! loongarch*-*-* } } } } } */
index 87258cec4a27e708392dc07bd1815a4d6b68946e..9e49b62b6de423a4fbbce83f7b06b6247d03d6df 100644 (file)
@@ -64,4 +64,4 @@ f10 (double a, double b, double c)
   return -__builtin_fma (a, b, -c);
 }
 
-/* { dg-final { scan-tree-dump-times { = \.FNMA \(} 14 "optimized" { target scalar_all_fma } } } */
+/* { dg-final { scan-tree-dump-times { = \.FNMA \(} 14 "optimized" { target { scalar_all_fma && { ! loongarch*-*-* } } } } } */
index f409cc8ee3c2c40ef4c9f81a51643769d32c3edf..86aacad7b90c41b9d8df95baa111da72dbb59b72 100644 (file)
@@ -64,4 +64,4 @@ f10 (double a, double b, double c)
   return -__builtin_fma (a, b, c);
 }
 
-/* { dg-final { scan-tree-dump-times { = \.FNMS \(} 14 "optimized" { target scalar_all_fma } } } */
+/* { dg-final { scan-tree-dump-times { = \.FNMS \(} 14 "optimized" { target { scalar_all_fma && { ! loongarch*-*-* } } } } } */