From patchwork Tue Jul 4 09:50:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5qKF5p2w?= X-Patchwork-Id: 115679 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1096199vqx; Tue, 4 Jul 2023 02:52:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlFi6RyKJxKZj7XxjZI2AWVWiLBfT5k2xG5W/ygcmNAiRJmp7YkVEfvZI7V810tyXJTVMGbS X-Received: by 2002:a05:6402:514:b0:514:9ab4:3524 with SMTP id m20-20020a056402051400b005149ab43524mr9065232edv.7.1688464349577; Tue, 04 Jul 2023 02:52:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688464349; cv=none; d=google.com; s=arc-20160816; b=OCEYtZzPKiYVuNRJSOwUEdVMBxERg578Es8l066Golm8MkTe1J8CQzvZ7uCAzsOEWe fUKa+HKKxILc5HEz4wtwZYrXaz/1Q7+76igqJeI2ZErKnMiqIsbWulY+9DJ2wYq22kzH dqeiaFaZOkBAP6hMv16vwYt+WQ/oUXIaEZ7HrGHpxhVBgxVOtwNqjfdbtRy6h54dMoDp sn+I7rqKe2sGTUGqnhp5sDHT8HD4pBaQyMZ23k+T7/HxQPMWuUIrUJVLoSxpHcLVrvx6 a+Rhoi8oTzqnKb9Kh20uynXhRDBVjLq7gMx1KidPO+Ya2YEAXvAYiAWJ0PLekmid7k1b 5/Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding:from :date:cc:mime-version:message-id:subject:to:dkim-signature :dmarc-filter:delivered-to; bh=Ck9TF8TOKzrOgHVttYeT8aqa0wcCHdomjP2jMdHSgLA=; fh=RiWyq4j32fO8TEHiTMbGfXDWtY26I78ncwpcub0BQlo=; b=NcN9aDO3Tj7ci+Mu5lE4z4ScTCo8rIGGRmiW6yLVCou9cWoQsAif+ICk6g43JNVL21 lL5F9K+mkKHpTExTbTWIHqKjRvMUxmm+csF55FSJik6XnNEmp6HVGJe61OJzpl5WZ2Uz +SoyrReUFncMz+AzzNeYPqPOY9JKPr/iMvhjCq7qiHnSWvMlCWym1VbnPEMKaG/6tCBT bfM70Q0ZNiGYiM9kV2+goojR4VqbwXRk6C7xQj3Sfwn549QW/l6e2Euckr/+F11NGdkl 1zxXg6GM4HHOodXvNFkYadeQNB9m3/oA0IsD53+6FjuQ0rS8ppR8creVvKGj/+/0yQSM kupQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@oss.cipunited.com header.s=feishu2303200042 header.b=KERh45Dg; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id r7-20020aa7d147000000b0051e1b16a086si1019001edo.69.2023.07.04.02.52.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 02:52:29 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@oss.cipunited.com header.s=feishu2303200042 header.b=KERh45Dg; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A67BD3858409 for ; Tue, 4 Jul 2023 09:52:23 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from t03.bc.larksuite.com (t03.bc.larksuite.com [209.127.231.38]) by sourceware.org (Postfix) with UTF8SMTPS id 829A33858D35 for ; Tue, 4 Jul 2023 09:51:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 829A33858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=oss.cipunited.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=oss.cipunited.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=feishu2303200042; d=oss.cipunited.com; t=1688464314; h=from:subject:mime-version:from:date:message-id:subject:to:cc: reply-to:content-type:mime-version:in-reply-to:message-id; bh=iEzpVZ8DNIkTt7rDTim2hR8gu0uKOBPJ5Ho3htx2SDQ=; b=KERh45DgnDfSzSjkJowIFkFOITYmHoxgAQ0y07QbXR0yQbEJoXFpws3JM8GELGdZRKgQVE GhvY8uhqaq60rm+ZYV8v9bjp2v3ax2XV2AltooLKZOFAUnpH2mvIpuy+i+nww/tsspdoss OKYEDrCC/qqIen0LdBffmEz5P6OIghqzVqt1TPXiIwRnzpfaxfFge2fp0LsMbOkihmP9kK 1cmU91bbFtc8eOCoDHHquxPl+YAOIw+j75ZvR5B5mJ3/voa0YHnGG6R9F7r4PHKWGLXbXx Tk7nolb4mJQcmGCThQi3cVy90pNTpdI6nqs6Ox+qMF0KNhLIXFQnzsEDJtUHww== To: X-Lms-Return-Path: Subject: [PATCH] MIPS: Adjust mips16e2 related tests for ifcvt costing changes X-Mailer: git-send-email 2.40.1 Message-Id: <20230704095048.1065139-1-jie.mei@oss.cipunited.com> Mime-Version: 1.0 Cc: "YunQiang Su" Date: Tue, 4 Jul 2023 17:50:48 +0800 From: "Jie Mei" X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, DKIM_INVALID, DKIM_SIGNED, GIT_PATCH_0, HTML_MESSAGE, KAM_DMARC_STATUS, KAM_SHORT, 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-Content-Filtered-By: Mailman/MimeDel 2.1.29 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770483193509137961?= X-GMAIL-MSGID: =?utf-8?q?1770483193509137961?= 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" } } */