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 ADB6D3857C43 for ; Fri, 26 Nov 2021 17:48:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ADB6D3857C43 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 1AQHl0cY010349; Fri, 26 Nov 2021 11:47:00 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 1AQHkx9D010348; Fri, 26 Nov 2021 11:46:59 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 26 Nov 2021 11:46:59 -0600 From: Segher Boessenkool To: Bill Schmidt Cc: GCC Patches , David Edelsohn Subject: Re: [PATCH, committed] rs6000: Fix test_mffsl.c effective target check Message-ID: <20211126174659.GS614@gate.crashing.org> References: <7dd2d61c-7f29-6d03-2f61-35eed745bc0a@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7dd2d61c-7f29-6d03-2f61-35eed745bc0a@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Fri, 26 Nov 2021 17:48:01 -0000 Hi! On Tue, Nov 23, 2021 at 01:14:05PM -0600, Bill Schmidt wrote: > Paul Clarke pointed out to me that I had wrongly used a compile-time check > instead of a run-time check in this executable test. This patch fixes > that. I also fixed a typo in a string that caught my eye. > > Tested on powerpc64le-linux-gnu, committed as obvious. Thanks. > --- a/gcc/testsuite/gcc.target/powerpc/test_mffsl.c > +++ b/gcc/testsuite/gcc.target/powerpc/test_mffsl.c > @@ -1,6 +1,6 @@ > /* { dg-do run { target { powerpc*-*-* } } } */ (The target clause is redundant fwiw, feel free to remove it). > /* { dg-options "-O2 -std=c99 -mcpu=power9" } */ > -/* { dg-require-effective-target powerpc_p9vector_ok } */ > +/* { dg-require-effective-target p9vector_hw } */ This selector doesn't make too much sense, since nothing in here requires vectors at all. p9modulo_hw makes more sense. Except the name of that should just be power9_hw :-) The OS can disallow vector insns (MSR[VEC] and/or MSR[VSX]), so p9vector_hw tests it isn't doing that, and that the hardware is a p9. p9modulo_hw does only the latter, and we have no reason to check separately if we can run modulo insns anyway :-) So please change the test here. And bonus points if you can rename p9modulo_hw and _ok (in a separate patch of course). Segher