From patchwork Sat Apr 29 16:21:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 68550 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EEAA53858413 for ; Sat, 29 Apr 2023 16:21:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id E08063858C50 for ; Sat, 29 Apr 2023 16:21:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E08063858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-63b4dfead1bso862535b3a.3 for ; Sat, 29 Apr 2023 09:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1682785282; x=1685377282; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=bRYp4JgVRjk/34JmX0FZ/p6Qrs0bQ0wz5BuGzMqw2nI=; b=BuzboN3d50MZi657YvgdQbRalsEQkTnyHvc6syYcbUYFzl7+/Z80XKt8Lbww6kPIh+ DeFt6CzMIyFdcuk9ux0YYYSKZqp6xOG+H8K6KYzh/QMVUmx48xvOAxfP3brsCaDS73/s f5XDQ75aY6xoqwMnoY2f9OyKqklpp5kRegocCNRBT13xxGRV3hRQeLfsrZa8ED/fiyN8 GmuHjAvnz/bkTWuUkdMLZ+WJlbHE0Im3Kc7O158GW2ki9x9N00ZPHRKA+kgu7uF1VVIN BTeNLwdwLFD9jwI1jHIwSy9hlws/aS+cbk6EbHKnYoxi70h5JGSzKuSaunlrD2oEViEI wZ3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682785282; x=1685377282; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bRYp4JgVRjk/34JmX0FZ/p6Qrs0bQ0wz5BuGzMqw2nI=; b=fY96dsGrfF6NC8MBd2AHESsnUu1Mz7wvDQctWcTbF2LL0JaeQ8hPHPn3ZYXUUai+ia l8S+Cn84WLWqGHJCfxoerdXZziLWNx8NRowILAnjxfcIk/xSK2n+Io0Th1jptzgwhqRg qrTLa77BO/nf6EJTLzUDOr5xeoSK3p1MkypU2uUrAcO/5a3QgIE6HE3+S9j2xBNNZpyf RWfynjKpoBs6Ym/22FiAX1AzGKIou+n6HTcPlJZDwJ16HP5yMFraCLYRYG7tHrqzqF5F eqF4VcrO8Ac3KhbJJF5YdkhO6e4Vx+2Tz/90LaDXxxRaM6U8SfrBk8qGEPXnLAV5C9Nq 6zOQ== X-Gm-Message-State: AC+VfDyZyJK6Uv3xreVuRXbUv+0Agt5W+7RSBJtXQQq1vBznQT2jSvjf q/4cze+HuinH2l9H7v7S+iQe5RHdhA5YhlcXu8M= X-Google-Smtp-Source: ACHHUZ6uc4IplTd7It6q5rTJqwzFvdpbkrY06U6C+I7NztYl8lA7s5E3pvejBw2Gxxi3AhLDVOeryA== X-Received: by 2002:aa7:8890:0:b0:63b:85a0:142a with SMTP id z16-20020aa78890000000b0063b85a0142amr13488630pfe.3.1682785282309; Sat, 29 Apr 2023 09:21:22 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::99f? ([2601:681:8600:13d0::99f]) by smtp.gmail.com with ESMTPSA id z27-20020aa7991b000000b006413bf8becesm2293280pff.63.2023.04.29.09.21.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Apr 2023 09:21:21 -0700 (PDT) Message-ID: <3370f73f-51d8-bd79-302f-d0593cebe832@ventanamicro.com> Date: Sat, 29 Apr 2023 10:21:20 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Content-Language: en-US To: "gcc-patches@gcc.gnu.org" From: Jeff Law Subject: [committed] [PR target/109549] Adjust mips test for recent ifcvt costing changes X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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. Committed to the trunk. Jeff commit ef6c3095aabe75af727a269d91d9ffa37f982ace 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 --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" } } */