From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2119) id C00083858C50; Sat, 29 Apr 2023 16:20:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C00083858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682785250; bh=6F61Z39ye52arzpH78mZWvrYkfQfJ5OjL+p6c8aU4P4=; h=From:To:Subject:Date:From; b=qsj8LjMGY+AqXgJQWiCCDzPiIPpZ8UkyLFMpI45TlWabT98gUJ6tH5rcnNmsd/xZh VMlxfLyNDxtfEpD15tlZrvEa6xzbkFmKrBN2ez1K0hs50sQS5q7gk2JWxJBFAUDa/y UIT0je47r/bzaPl10i6BNemNAOkSDv5e3mmTh6kY= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jeff Law To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-347] Adjust mips test for recent ifcvt costing changes X-Act-Checkin: gcc X-Git-Author: Jeff Law X-Git-Refname: refs/heads/master X-Git-Oldrev: a5b2a3bff8152aa34408d8ce40add82f4d22ff87 X-Git-Newrev: ef6c3095aabe75af727a269d91d9ffa37f982ace Message-Id: <20230429162050.C00083858C50@sourceware.org> Date: Sat, 29 Apr 2023 16:20:50 +0000 (GMT) List-Id: https://gcc.gnu.org/g:ef6c3095aabe75af727a269d91d9ffa37f982ace commit r14-347-gef6c3095aabe75af727a269d91d9ffa37f982ace Author: Jeff Law Date: Sat Apr 29 10:16:21 2023 -0600 Adjust mips test for recent ifcvt costing changes MIPS ports have been failing a few tests since the change to add cost checks in another path through the if-converter pass. As with the other ports, these look like cases where we don't do good costing in the MIPS port. Someone who cares about MIPS will need to fix this properly. In the mean time this patch adjusts the branch cost when running the two affected tests and skips them at -Os. This is enough to verify that if conversion can still happen if the costs are adjusted. gcc/testsuite * gcc.target/mips/mips-ps-type-2.c: Adjust branch cost to encourage if-conversion. Skip for -Os. * gcc.target/mips/movcc-3.c: Similarly. Diff: --- gcc/testsuite/gcc.target/mips/mips-ps-type-2.c | 4 ++-- gcc/testsuite/gcc.target/mips/movcc-3.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.target/mips/mips-ps-type-2.c b/gcc/testsuite/gcc.target/mips/mips-ps-type-2.c index ed5d6ee1663..e5cb7d48dae 100644 --- a/gcc/testsuite/gcc.target/mips/mips-ps-type-2.c +++ b/gcc/testsuite/gcc.target/mips/mips-ps-type-2.c @@ -1,8 +1,8 @@ /* Test v2sf calculations. The nmadd and nmsub patterns need -ffinite-math-only. */ /* { dg-do compile } */ -/* { dg-options "(HAS_MADDPS) -mmadd4 -mgp32 -mpaired-single -ffinite-math-only forbid_cpu=octeon.*" } */ -/* { dg-skip-if "nmadd and nmsub need combine" { *-*-* } { "-O0" } { "" } } */ +/* { dg-options "(HAS_MADDPS) -mmadd4 -mgp32 -mpaired-single -ffinite-math-only forbid_cpu=octeon.* -mbranch-cost=2" } */ +/* { dg-skip-if "nmadd and nmsub need combine" { *-*-* } { "-O0" "-Os" } { "" } } */ /* { dg-final { scan-assembler "\tcvt.ps.s\t" } } */ /* { dg-final { scan-assembler "\tmov.ps\t" } } */ /* { dg-final { scan-assembler "\tldc1\t" } } */ diff --git a/gcc/testsuite/gcc.target/mips/movcc-3.c b/gcc/testsuite/gcc.target/mips/movcc-3.c index 55434b72c72..80d44098a3f 100644 --- a/gcc/testsuite/gcc.target/mips/movcc-3.c +++ b/gcc/testsuite/gcc.target/mips/movcc-3.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "(HAS_MOVN) -mhard-float" } */ -/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ +/* { dg-options "(HAS_MOVN) -mhard-float -mbranch-cost=2" } */ +/* { dg-skip-if "code quality test" { *-*-* } { "-O0" "-Os" } { "" } } */ /* { dg-final { scan-assembler "\tmovt\t" } } */ /* { dg-final { scan-assembler "\tmovf\t" } } */ /* { dg-final { scan-assembler "\tmovz.s\t" } } */