aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDi Zhao <dizhao@os.amperecomputing.com>2023-12-26 16:36:02 +0800
committerDi Zhao <dizhao@os.amperecomputing.com>2023-12-26 16:38:21 +0800
commit6cec7b06b3c8187b36fc05cfd4dd38b42313d727 (patch)
tree5d4874a7f693841b2d84acd7f099b58c093db95b /gcc
parent7c6615692e052e6bd08f46d9ed060fdbcd711c5c (diff)
downloadgcc-6cec7b06b3c8187b36fc05cfd4dd38b42313d727.zip
gcc-6cec7b06b3c8187b36fc05cfd4dd38b42313d727.tar.gz
gcc-6cec7b06b3c8187b36fc05cfd4dd38b42313d727.tar.bz2
Fix compile options of pr110279-1.c and pr110279-2.c
The two testcases are for targets that support FMA. And pr110279-2.c assumes reassoc_width of FMUL to be 4. This patch adds missing options, to fix regression test failures on nvptx/GCN (default reassoc_width of FMUL is 1) and x86_64 (need "-mfma"). gcc/testsuite/ChangeLog: * gcc.dg/pr110279-1.c: Add "-mcpu=generic" for aarch64; add "-mfma" for x86_64. * gcc.dg/pr110279-2.c: Replace "-march=armv8.2-a" with "-mcpu=generic"; limit the check to be on aarch64.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.dg/pr110279-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/pr110279-2.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/gcc/testsuite/gcc.dg/pr110279-1.c b/gcc/testsuite/gcc.dg/pr110279-1.c
index a62acb7..a8c7257 100644
--- a/gcc/testsuite/gcc.dg/pr110279-1.c
+++ b/gcc/testsuite/gcc.dg/pr110279-1.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-Ofast --param avoid-fma-max-bits=512 --param tree-reassoc-width=4 -fdump-tree-widening_mul-details" } */
-/* { dg-additional-options "-march=armv8.2-a" { target aarch64-*-* } } */
+/* { dg-additional-options "-mcpu=generic" { target aarch64*-*-* } } */
+/* { dg-additional-options "-mfma" { target i?86-*-* x86_64-*-* } } */
/* { dg-additional-options "-march=2.0" { target hppa*-*-* } } */
#define LOOP_COUNT 800000000
diff --git a/gcc/testsuite/gcc.dg/pr110279-2.c b/gcc/testsuite/gcc.dg/pr110279-2.c
index b6b6996..135e6488 100644
--- a/gcc/testsuite/gcc.dg/pr110279-2.c
+++ b/gcc/testsuite/gcc.dg/pr110279-2.c
@@ -1,7 +1,7 @@
/* PR tree-optimization/110279 */
/* { dg-do compile } */
/* { dg-options "-Ofast --param tree-reassoc-width=4 --param fully-pipelined-fma=1 -fdump-tree-reassoc2-details -fdump-tree-optimized" } */
-/* { dg-additional-options "-march=armv8.2-a" { target aarch64-*-* } } */
+/* { dg-additional-options "-mcpu=generic" { target aarch64*-*-* } } */
#define LOOP_COUNT 800000000
typedef double data_e;
@@ -35,5 +35,5 @@ foo (data_e in)
return result + result2;
}
-/* { dg-final { scan-tree-dump-not "was chosen for reassociation" "reassoc2"} } */
-/* { dg-final { scan-tree-dump-times {\.FMA } 3 "optimized"} } */ \ No newline at end of file
+/* { dg-final { scan-tree-dump-not "was chosen for reassociation" "reassoc2" { target aarch64*-*-* }} } */
+/* { dg-final { scan-tree-dump-times {\.FMA } 3 "optimized" { target aarch64*-*-* }} } */ \ No newline at end of file