From patchwork Wed Aug 31 09:33:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kewen.Lin" X-Patchwork-Id: 859 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:ecc5:0:0:0:0:0 with SMTP id s5csp142810wro; Wed, 31 Aug 2022 02:35:16 -0700 (PDT) X-Google-Smtp-Source: AA6agR5m3dlOPwZ5UHGPZn28QI13siXvd6ZZWCzch5SA70OReBsaj1Fg7xaKqaR/yEAd6P/csWm9 X-Received: by 2002:a05:6402:440c:b0:43a:1124:e56a with SMTP id y12-20020a056402440c00b0043a1124e56amr24435649eda.134.1661938516040; Wed, 31 Aug 2022 02:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661938516; cv=none; d=google.com; s=arc-20160816; b=hLHd3iujHa9Sy0u8TSfrsAot8MjdEBw8wXi8QQelpBHEsJ4YMROUcRly/SA2sICEFz iNf37S3JKwh053xl1CNI6y7qZtbzCBg502dYZRMbz2t9sMt6LApszlXnoRHgHNj824am lFEJvwrB9KjBv7Wj4lHVejM4BPYIdArpoyyQPxt5qThb2tn9dO+QDrcDINvYnchCwk7r Uf63VbwKCJdEQme1bYL4Qk+W4qH0uMElsc5vCBtsqkyKHGwEtD8HlUl4Ke4krUYap+2s OyW2lrvTixmCYqkKQJcx+DBgDR3GYztqIxpagIsWRIGMX7oKWWcJBKaOUNztDhNN0wfS 9AYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:subject:to:content-language:user-agent :mime-version:date:message-id:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=VlgaHrbwDlascBq9uESz/IirrRh1Eo2MYxXB2p2zcF4=; b=aRt9jKu9MrQ3EiyDnADP/0BOD6mhz++C9NXuI4poYFnDXC+/ag6ZtBFbvMpReK4yui yT+YOYJ2hWp4ryvliZf9pfEPDCrO50c8EVXu/fZhJZU381ZYYo2zpldh6z9yOobg9Uts sYnHGwJsOam7KS12oOrXAOszwScmqdcPSio++0om+6z8m1dsjrO+47ne2XWTX8OobA8j /0nXu8LshFiRG2+4vK5PSBYVvjzs0YC1MOMWU++F17mA8XHYk5MAjLSVtaneBnvv3yHg RLktFa+FHAfrFsfuJK/y1XnxZhNIDmEMhzCK0JzdkF5B/BKbbyE4CK6Ba2EEPVOwM97D I5RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=pC5Uvbgp; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id qf2-20020a1709077f0200b0073dd82e8bafsi8033138ejc.565.2022.08.31.02.35.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 02:35:16 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=pC5Uvbgp; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F36CB383CCFC for ; Wed, 31 Aug 2022 09:35:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F36CB383CCFC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661938515; bh=VlgaHrbwDlascBq9uESz/IirrRh1Eo2MYxXB2p2zcF4=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=pC5UvbgpPcGR0dVyZGl8oyeKZQX63vm9d2CvMVzV3ZSy+VyQNEgvtvmvIf6+igO2D y2nYb4NusWlSL6XZGr0BShqJLfBA/TxaYfpzHgXVFS5OeRJ65UblaXeXTZcdQNrkmY oLSoDBQJHC5QNwwGrhw9I4OyZ5vfkHdcL/KYV+Y4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 1ED563858280 for ; Wed, 31 Aug 2022 09:34:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1ED563858280 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27V9EKpU027451; Wed, 31 Aug 2022 09:34:31 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ja4u28gye-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Aug 2022 09:34:30 +0000 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27V9GIq0003272; Wed, 31 Aug 2022 09:34:30 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3ja4u28gpb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Aug 2022 09:34:28 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27V9K7om026108; Wed, 31 Aug 2022 09:33:34 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma01fra.de.ibm.com with ESMTP id 3j8hkaagv0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Aug 2022 09:33:34 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27V9XWOc36897256 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 Aug 2022 09:33:32 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0E93EA4040; Wed, 31 Aug 2022 09:33:32 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 657FEA4051; Wed, 31 Aug 2022 09:33:30 +0000 (GMT) Received: from [9.197.247.44] (unknown [9.197.247.44]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 31 Aug 2022 09:33:30 +0000 (GMT) Message-ID: <69277846-f587-b79e-f741-a2942d326778@linux.ibm.com> Date: Wed, 31 Aug 2022 17:33:28 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: en-US To: GCC Patches Subject: [PATCH] rs6000/test: Fix bswap64-4.c with has_arch_ppc64 [PR106680] X-TM-AS-GCONF: 00 X-Proofpoint-GUID: P-P5OGkAoGlX13BRKKfv8KImKAGihOuh X-Proofpoint-ORIG-GUID: UXMxZCkjjlqBwBnv5vC-ed9MhRW1Lguy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-31_05,2022-08-31_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=999 spamscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 mlxscore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208310047 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_MSPIKE_H2, 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: , X-Patchwork-Original-From: "Kewen.Lin via Gcc-patches" From: "Kewen.Lin" Reply-To: "Kewen.Lin" Cc: Peter Bergner , David Edelsohn , Segher Boessenkool 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?1742668841528219468?= X-GMAIL-MSGID: =?utf-8?q?1742668841528219468?= Hi, Test case bswap64-4.c suffers the issue as its comments: /* On some versions of dejagnu this test will fail when biarch testing with RUNTESTFLAGS="--target_board=unix '{-m64,-m32}'" due to -m32 being added on the command line after the dg-options -mpowerpc64. common/config/rs6000/rs6000-common.c: rs6000_handle_option disables -mpowerpc64 for -m32. */ As tested, on test machine with dejaGnu 1.6.2, the compilation option order looks like: -m32 ... -mpowerpc64, option -mpowerpc64 still takes effect; While on test machine with dejaGnu 1.5.1, the option order looks like: -mpowerpc64 ... -m32, option -mpowerpc64 is disabled by -m32, then the case fails. This fix leverages the new effective target has_arch_ppc64 and places dg-options before dg-require-effective-target (it makes dg-options to be used for has_arch_ppc64 checking), on machine with dejaGnu 1.6.2, the checking succeeds and the case passes; while on machine with dejaGnu 1.5.1, the checking fails then the case is marked as unsupported. Tested on powerpc64-linux-gnu P7 and P8, and powerpc64le-linux-gnu P9 and P10. I'll push this soon if no objections. BR, Kewen ----- PR testsuite/106680 gcc/testsuite/ChangeLog: * gcc.target/powerpc/bswap64-4.c: Adjust with has_arch_ppc64. --- gcc/testsuite/gcc.target/powerpc/bswap64-4.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.27.0 diff --git a/gcc/testsuite/gcc.target/powerpc/bswap64-4.c b/gcc/testsuite/gcc.target/powerpc/bswap64-4.c index 5acbb91ee38..85a7bbbd367 100644 --- a/gcc/testsuite/gcc.target/powerpc/bswap64-4.c +++ b/gcc/testsuite/gcc.target/powerpc/bswap64-4.c @@ -1,7 +1,8 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ /* { dg-skip-if "" { powerpc*-*-aix* } } */ -/* { dg-options "-O2 -mpowerpc64" } */ /* { dg-require-effective-target ilp32 } */ +/* { dg-options "-O2 -mpowerpc64" } */ +/* { dg-require-effective-target has_arch_ppc64 } */ /* { dg-final { scan-assembler-times "lwbrx" 2 { target { ! has_arch_pwr7 } } } } */ /* { dg-final { scan-assembler-times "stwbrx" 2 { target { ! has_arch_pwr7 } } } } */ /* { dg-final { scan-assembler-times "ldbrx" 1 { target has_arch_pwr7 } } } */