* [PATCH] MIPS: Adjust mips16e2 related tests for ifcvt costing changes
@ 2023-07-04 9:50 Jie Mei
2023-07-05 1:36 ` YunQiang Su
0 siblings, 1 reply; 2+ messages in thread
From: Jie Mei @ 2023-07-04 9:50 UTC (permalink / raw)
To: gcc-patches; +Cc: YunQiang Su
[-- Attachment #1: Type: text/plain, Size: 1777 bytes --]
A mips16e2 related test fails after the ifcvt change. The mips16e2
addition also causes a test for unrelated module to fail.
This patch adjusts branch costs when running the two affected tests.
These tests should not require the -mbranch-cost option, and
this issue needs to be addressed.
gcc/testsuite/ChangeLog:
* gcc.target/mips/mips16e2-cmov.c: Adjust branch cost to
encourage if-conversion.
* gcc.target/mips/movcc-3.c: Same as above.
---
gcc/testsuite/gcc.target/mips/mips16e2-cmov.c | 2 +-
gcc/testsuite/gcc.target/mips/movcc-3.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.target/mips/mips16e2-cmov.c b/gcc/testsuite/gcc.target/mips/mips16e2-cmov.c
index 6e9dd82ebf3..129ea23b65b 100644
--- a/gcc/testsuite/gcc.target/mips/mips16e2-cmov.c
+++ b/gcc/testsuite/gcc.target/mips/mips16e2-cmov.c
@@ -1,4 +1,4 @@
-/* { dg-options "-mno-abicalls -mgpopt -G8 -mabi=32 -mips16 -mmips16e2" } */
+/* { dg-options "-mno-abicalls -mgpopt -G8 -mabi=32 -mips16 -mmips16e2 -mbranch-cost=2" } */
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* Test MOVN. */
diff --git a/gcc/testsuite/gcc.target/mips/movcc-3.c b/gcc/testsuite/gcc.target/mips/movcc-3.c
index 80d44098a3f..569a00423c1 100644
--- a/gcc/testsuite/gcc.target/mips/movcc-3.c
+++ b/gcc/testsuite/gcc.target/mips/movcc-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "(HAS_MOVN) -mhard-float -mbranch-cost=2" } */
+/* { dg-options "(HAS_MOVN) -mhard-float -mbranch-cost=3" } */
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" "-Os" } { "" } } */
/* { dg-final { scan-assembler "\tmovt\t" } } */
/* { dg-final { scan-assembler "\tmovf\t" } } */
--
2.40.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: Adjust mips16e2 related tests for ifcvt costing changes
2023-07-04 9:50 [PATCH] MIPS: Adjust mips16e2 related tests for ifcvt costing changes Jie Mei
@ 2023-07-05 1:36 ` YunQiang Su
0 siblings, 0 replies; 2+ messages in thread
From: YunQiang Su @ 2023-07-05 1:36 UTC (permalink / raw)
To: Jie Mei; +Cc: gcc-patches, YunQiang Su, Jeff Law
Jie Mei <jie.mei@oss.cipunited.com> 于2023年7月4日周二 17:52写道:
>
> A mips16e2 related test fails after the ifcvt change. The mips16e2
> addition also causes a test for unrelated module to fail.
>
> This patch adjusts branch costs when running the two affected tests.
>
> These tests should not require the -mbranch-cost option, and
> this issue needs to be addressed.
>
Wish it soon.
> gcc/testsuite/ChangeLog:
>
> * gcc.target/mips/mips16e2-cmov.c: Adjust branch cost to
> encourage if-conversion.
> * gcc.target/mips/movcc-3.c: Same as above.
> ---
> gcc/testsuite/gcc.target/mips/mips16e2-cmov.c | 2 +-
> gcc/testsuite/gcc.target/mips/movcc-3.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/mips/mips16e2-cmov.c b/gcc/testsuite/gcc.target/mips/mips16e2-cmov.c
> index 6e9dd82ebf3..129ea23b65b 100644
> --- a/gcc/testsuite/gcc.target/mips/mips16e2-cmov.c
> +++ b/gcc/testsuite/gcc.target/mips/mips16e2-cmov.c
> @@ -1,4 +1,4 @@
> -/* { dg-options "-mno-abicalls -mgpopt -G8 -mabi=32 -mips16 -mmips16e2" } */
> +/* { dg-options "-mno-abicalls -mgpopt -G8 -mabi=32 -mips16 -mmips16e2 -mbranch-cost=2" } */
> /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
>
> /* Test MOVN. */
> diff --git a/gcc/testsuite/gcc.target/mips/movcc-3.c b/gcc/testsuite/gcc.target/mips/movcc-3.c
> index 80d44098a3f..569a00423c1 100644
> --- a/gcc/testsuite/gcc.target/mips/movcc-3.c
> +++ b/gcc/testsuite/gcc.target/mips/movcc-3.c
> @@ -1,5 +1,5 @@
> /* { dg-do compile } */
> -/* { dg-options "(HAS_MOVN) -mhard-float -mbranch-cost=2" } */
> +/* { dg-options "(HAS_MOVN) -mhard-float -mbranch-cost=3" } */
> /* { dg-skip-if "code quality test" { *-*-* } { "-O0" "-Os" } { "" } } */
> /* { dg-final { scan-assembler "\tmovt\t" } } */
> /* { dg-final { scan-assembler "\tmovf\t" } } */
> --
> 2.40.1
--
YunQiang Su
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-05 1:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 9:50 [PATCH] MIPS: Adjust mips16e2 related tests for ifcvt costing changes Jie Mei
2023-07-05 1:36 ` YunQiang Su
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).