Hi,

As PR106345 shows, some test cases should be updated with
-mdejagnu-tune, since their test points are sensitive to
rs6000_tune, such as: group_ending_nop, loop align (ic),
float conversion cost etc.

This patch is to replace -mdejagnu-cpu with -mdejagnu-tune
or append -mdejagnu-tune (keep the original -mdejagnu-cpu
when it's required) accordingly.

Tested on powerpc64-linux-gnu P7 and P8 and
powerpc64le-linux-gnu P9 and P10, also with explicit p10
tune setting for configuration.

I'll push this soon if no objections.

BR,
Kewen
-----
        PR testsuite/106345

gcc/testsuite/ChangeLog:

        * gcc.target/powerpc/lhs-1.c: Replace -mdejagnu-cpu with
        -mdejagnu-tune.
        * gcc.target/powerpc/loop_align.c: Likewise.
        * gcc.target/powerpc/lhs-2.c: Append -mdejagnu-tune.
        * gcc.target/powerpc/lhs-3.c: Likewise.
        * gcc.target/powerpc/compress-float-ppc-pic.c: Likewise.
        * gcc.target/powerpc/compress-float-ppc.c: Likewise.
---
 gcc/testsuite/gcc.target/powerpc/compress-float-ppc-pic.c | 2 +-
 gcc/testsuite/gcc.target/powerpc/compress-float-ppc.c     | 2 +-
 gcc/testsuite/gcc.target/powerpc/lhs-1.c                  | 2 +-
 gcc/testsuite/gcc.target/powerpc/lhs-2.c                  | 2 +-
 gcc/testsuite/gcc.target/powerpc/lhs-3.c                  | 2 +-
 gcc/testsuite/gcc.target/powerpc/loop_align.c             | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/compress-float-ppc-pic.c 
b/gcc/testsuite/gcc.target/powerpc/compress-float-ppc-pic.c
index 8961be51d2f..d14ccb433b9 100644
--- a/gcc/testsuite/gcc.target/powerpc/compress-float-ppc-pic.c
+++ b/gcc/testsuite/gcc.target/powerpc/compress-float-ppc-pic.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target powerpc_fprs } } */
-/* { dg-options "-O2 -fpic -mdejagnu-cpu=power5" } */
+/* { dg-options "-O2 -fpic -mdejagnu-cpu=power5 -mdejagnu-tune=power5" } */
 /* { dg-require-effective-target fpic } */

 double foo (double x) {
diff --git a/gcc/testsuite/gcc.target/powerpc/compress-float-ppc.c 
b/gcc/testsuite/gcc.target/powerpc/compress-float-ppc.c
index 650f559f347..d6f84e57ab9 100644
--- a/gcc/testsuite/gcc.target/powerpc/compress-float-ppc.c
+++ b/gcc/testsuite/gcc.target/powerpc/compress-float-ppc.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target powerpc_fprs } } */
-/* { dg-options "-O2 -mdejagnu-cpu=power5" } */
+/* { dg-options "-O2 -mdejagnu-cpu=power5 -mdejagnu-tune=power5" } */

 double foo (double x) {
   return x + 1.75;
diff --git a/gcc/testsuite/gcc.target/powerpc/lhs-1.c 
b/gcc/testsuite/gcc.target/powerpc/lhs-1.c
index 4e13fd2fb70..bcb41abbe91 100644
--- a/gcc/testsuite/gcc.target/powerpc/lhs-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/lhs-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
-/* { dg-options "-O2 -mdejagnu-cpu=power5" } */
+/* { dg-options "-O2 -mdejagnu-tune=power5" } */
 /* { dg-final { scan-assembler-times "nop" 3 } } */

 /* Test generation of nops in load hit store situation.  Make sure enough nop
diff --git a/gcc/testsuite/gcc.target/powerpc/lhs-2.c 
b/gcc/testsuite/gcc.target/powerpc/lhs-2.c
index d1b18b1591d..22aa0d8712f 100644
--- a/gcc/testsuite/gcc.target/powerpc/lhs-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/lhs-2.c
@@ -1,6 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
-/* { dg-options "-O2 -mdejagnu-cpu=power6 -msched-groups" } */
+/* { dg-options "-O2 -mdejagnu-cpu=power6 -mdejagnu-tune=power6 
-msched-groups" } */
 /* { dg-final { scan-assembler "ori 1,1,0" } } */

 /* Test generation of group ending nop in load hit store situation.  */
diff --git a/gcc/testsuite/gcc.target/powerpc/lhs-3.c 
b/gcc/testsuite/gcc.target/powerpc/lhs-3.c
index 9d6bbcf69f7..d7b500092bb 100644
--- a/gcc/testsuite/gcc.target/powerpc/lhs-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/lhs-3.c
@@ -1,6 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
-/* { dg-options "-O2 -mdejagnu-cpu=power7" } */
+/* { dg-options "-O2 -mdejagnu-cpu=power7 -mdejagnu-tune=power7" } */
 /* { dg-final { scan-assembler "ori 2,2,0" } } */

 /* Test generation of group ending nop in load hit store situation.  */
diff --git a/gcc/testsuite/gcc.target/powerpc/loop_align.c 
b/gcc/testsuite/gcc.target/powerpc/loop_align.c
index ef67f77efed..36e3b4c98c3 100644
--- a/gcc/testsuite/gcc.target/powerpc/loop_align.c
+++ b/gcc/testsuite/gcc.target/powerpc/loop_align.c
@@ -1,6 +1,6 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* powerpc-ibm-aix* } } */
-/* { dg-options "-O2 -mdejagnu-cpu=power7 -falign-functions=16 
-fno-unroll-loops" } */
+/* { dg-options "-O2 -mdejagnu-tune=power7 -falign-functions=16 
-fno-unroll-loops" } */
 /* { dg-final { scan-assembler ".p2align 5" } } */

 void f(double *a, double *b, double *c, unsigned long n) {
--
2.27.0

Reply via email to