From patchwork Fri Aug 26 07:29:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: HAO CHEN GUI X-Patchwork-Id: 1670550 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=S/3Og3z8; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MDWjS0q4Wz1yhc for ; Fri, 26 Aug 2022 17:31:22 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2FE0A382DB34 for ; Fri, 26 Aug 2022 07:31:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2FE0A382DB34 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661499080; bh=SlA0uRnFBpqEfUJvzeEA20VyFBH0uj6Kt26tuWq9kTQ=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=S/3Og3z8pwhZMqQ0xEY+s/2fiqlf22ujoeZxkrBDMD7Bwz4Z+IAvfFyG97BeFiATH Ad6d3DtGEOvAsneaz1m/Dj2jtmvkJYsscC8j2mvdWx3yWmqUedBZbn1uxOZ8FaIjc0 Eaf+J7y93/1PzQs2FxY63cIn+AYAuIN1yr7y5s4s= 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 652343858004 for ; Fri, 26 Aug 2022 07:30:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 652343858004 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27Q7E2rw010462; Fri, 26 Aug 2022 07:30:59 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j6skjrfax-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Aug 2022 07:30:58 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27Q7TGBg005996; Fri, 26 Aug 2022 07:30:58 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j6skjrf92-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Aug 2022 07:30:58 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27Q7Le2d027876; Fri, 26 Aug 2022 07:29:56 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma03ams.nl.ibm.com with ESMTP id 3j2q88yd38-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Aug 2022 07:29:55 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27Q7TqYE41615668 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Aug 2022 07:29:52 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BEEF842045; Fri, 26 Aug 2022 07:29:52 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C9F1642042; Fri, 26 Aug 2022 07:29:50 +0000 (GMT) Received: from [9.197.246.144] (unknown [9.197.246.144]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 26 Aug 2022 07:29:50 +0000 (GMT) Message-ID: <55b5d04e-fa0a-771a-0c7a-f7dfb114fc8c@linux.ibm.com> Date: Fri, 26 Aug 2022 15:29:49 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Content-Language: en-US To: gcc-patches Subject: [PATCH, rs6000] Put dg-options ahead of target selector checks X-TM-AS-GCONF: 00 X-Proofpoint-GUID: f1mWmv-aoVVnJNS2ReOxwCkPPMXPHcK0 X-Proofpoint-ORIG-GUID: xl9L5fYYQ97K-I4uQmDU8vCBPdJAx7aG 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-26_02,2022-08-25_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 impostorscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 clxscore=1015 priorityscore=1501 suspectscore=0 mlxscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208260025 X-Spam-Status: No, score=-11.7 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: HAO CHEN GUI via Gcc-patches From: HAO CHEN GUI Reply-To: HAO CHEN GUI Cc: Peter Bergner , David , Segher Boessenkool Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi, This patch changes the sequence of test directives for 3 cases. Originally, these 3 cases got failed or unsupported on some platforms, as their target selector checks depend on compiling options. Bootstrapped and tested on powerpc64-linux BE and LE with no regressions. Is this okay for trunk? Any recommendations? Thanks a lot. Thanks Gui Haochen ChangeLog 2022-08-26 Haochen Gui rs6000: Change the sequence of test directives for some test cases. Put dg-options ahead of target selector checks as the compiling options affect the result of these checks. gcc/testsuite/ * gcc.target/powerpc/pr92398.p9+.c: Put dg-options ahead of target selector check. * gcc.target/powerpc/pr92398.p9-.c: Likewise. * gcc.target/powerpc/pr93453-1.c: Likewise. patch.diff diff --git a/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c b/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c index 72dd1d9a274..4e4fad620e8 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c +++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9+.c @@ -1,6 +1,8 @@ -/* { dg-do compile { target { lp64 && has_arch_pwr9 } } } */ +/* { dg-do compile } */ +/* { dg-options "-O2 -mdejagnu-cpu=power9 -mvsx" } */ +/* { dg-require-effective-target has_arch_ppc64 } */ +/* { dg-require-effective-target int128 } */ /* { dg-require-effective-target powerpc_vsx_ok } */ -/* { dg-options "-O2 -mvsx" } */ /* { dg-final { scan-assembler-times {\mmtvsrdd\M} 1 } } */ /* { dg-final { scan-assembler-times {\mxxlnor\M} 1 } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c b/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c index bd7fa98af51..4e6a8c8cb8e 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c +++ b/gcc/testsuite/gcc.target/powerpc/pr92398.p9-.c @@ -1,6 +1,8 @@ -/* { dg-do compile { target { lp64 && {! has_arch_pwr9} } } } */ -/* { dg-require-effective-target powerpc_vsx_ok } */ /* { dg-options "-O2 -mvsx" } */ +/* { dg-do compile { target { ! has_arch_pwr9 } } } */ +/* { dg-require-effective-target int128 } */ +/* { dg-require-effective-target has_arch_ppc64 } */ +/* { dg-require-effective-target powerpc_vsx_ok } */ /* { dg-final { scan-assembler-times {\mnot\M} 2 { xfail be } } } */ /* { dg-final { scan-assembler-times {\mstd\M} 2 { xfail { { {! has_arch_pwr9} && has_arch_pwr8 } && be } } } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/pr93453-1.c b/gcc/testsuite/gcc.target/powerpc/pr93453-1.c index b396458ba12..6f4d899c114 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr93453-1.c +++ b/gcc/testsuite/gcc.target/powerpc/pr93453-1.c @@ -1,5 +1,6 @@ -/* { dg-do compile { target has_arch_ppc64 } } */ +/* { dg-do compile } */ /* { dg-options "-mdejagnu-cpu=power6 -O2" } */ +/* { dg-require-effective-target has_arch_ppc64 } */ unsigned long load_byte_reverse (unsigned long *in) {