From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id E4EC43858C2F for ; Thu, 25 Aug 2022 15:19:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E4EC43858C2F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 27PFI0Qh017125; Thu, 25 Aug 2022 10:18:00 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 27PFHxSH017120; Thu, 25 Aug 2022 10:17:59 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 25 Aug 2022 10:17:59 -0500 From: Segher Boessenkool To: HAO CHEN GUI Cc: gcc-patches , David , "Kewen.Lin" , Peter Bergner Subject: Re: [PATCH, rs6000] Change insn condition from TARGET_64BIT to TARGET_POWERPC64 for VSX scalar extract/insert instructions Message-ID: <20220825151759.GF25951@gate.crashing.org> References: <2ffb2ff4-540d-3bcf-4e4e-478acbdd910d@linux.ibm.com> <20220823142620.GU25951@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Aug 24, 2022 at 01:11:39PM +0800, HAO CHEN GUI wrote: > On 23/8/2022 下午 10:26, Segher Boessenkool wrote: > > On Fri, Aug 19, 2022 at 10:35:54AM +0800, HAO CHEN GUI wrote: > >> --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-0.c > >> +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-0.c > >> @@ -1,7 +1,8 @@ > >> /* { dg-do compile { target { powerpc*-*-* } } } */ > >> -/* { dg-require-effective-target lp64 } */ > >> -/* { dg-require-effective-target powerpc_p9vector_ok } */ > >> /* { dg-options "-mdejagnu-cpu=power9" } */ > >> +/* { dg-additional-options "-mpowerpc64" { target { powerpc*-*-linux* && ilp32 } } } */ > > > > You can add this always. It is default on 64-bit systems, but it is > > simpler to just always add it: > > /* { dg-additional-options "-mpowerpc64" } */ > > > > Or are there subtargets that will error on this? > Yes, AIX fails if TARGET_POWERPC64 is set and TARGET_64BIT is not set. > So I add "-mpowerpc64" for Linux 32-bit environment. Aha. But you can add it for all linux: /* { dg-additional-options "-mpowerpc64" { target powerpc*-*-linux* } } */ (or *-*-linux* even, everything in gcc.target/powerpc is known to be powerpc*-*-* already). Not that it matters at all here, as the other thread shows :-), but for the future: run testcases wherever possible (and reasonable), and in the same vein, try not to specialise option when you do not have to. Doing this makes testing much less work, makes it easier to have reasonable coverage. Segher