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 907733858C27 for ; Tue, 31 Aug 2021 22:53:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 907733858C27 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail 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 17VMqnGs012028; Tue, 31 Aug 2021 17:52:49 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 17VMqmRu012027; Tue, 31 Aug 2021 17:52:48 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 31 Aug 2021 17:52:48 -0500 From: Segher Boessenkool To: Michael Meissner , will schmidt , gcc-patches@gcc.gnu.org, David Edelsohn , Bill Schmidt , Peter Bergner Subject: Re: [PATCH] Generate XXSPLTIDP on power10. Message-ID: <20210831225248.GG1583@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR 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: Tue, 31 Aug 2021 22:53:52 -0000 Hi! On Thu, Aug 26, 2021 at 05:28:42PM -0400, Michael Meissner wrote: > On Thu, Aug 26, 2021 at 02:17:57PM -0500, will schmidt wrote: > > On Wed, 2021-08-25 at 15:46 -0400, Michael Meissner wrote: > > > Generate XXSPLTIDP on power10. > > > > > > I have added a temporary switch (-mxxspltidp) to control whether or not the > > > XXSPLTIDP instruction is generated. > > > > How temporary? > > Until we decide we no longer need to disable the option to do tests. Probably > at the end of stage1. Don't do it at all please. If it is useful to disable some new strategy for generating constants, a (temporary or at least undocumented) flag for that can be handy. But a flag to disable separate insns is a liability, it makes the compiler much more fragile, makes changing the compiler hard because of all the surprises hidden. > > > (xxspltidp_operand): New predicate. > > > > Will there ever be another instruction using the SF/DF CONST_DOUBLE or > > V2DF CONST_VECTOR ? I tentatively question the name of the operand, > > but defer.. > > This is the convention I've used for adding other instructions like xxspltib. The only reason it is a good idea here is because of the strange behaviour this insn has with single precision subnormals. In general a better name here would be something like "sf_as_int_operand". The insn should probably not allow anything else than bit patterns, not floating point constants, have a separate pattern for that (that can then forward to the integer one). > This way we have just one place that centralizes the knowledge about the > instruction. That one place should be the define_insn for it. Segher