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 E4FFD3858D38; Sat, 11 Jul 2020 00:54:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E4FFD3858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@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 06B0sdVL018396; Fri, 10 Jul 2020 19:54:39 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 06B0scQ7018395; Fri, 10 Jul 2020 19:54:38 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 10 Jul 2020 19:54:38 -0500 From: Segher Boessenkool To: luoxhu Cc: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com, wschmidt@linux.ibm.com, guojiufu@linux.ibm.com, linkw@gcc.gnu.org Subject: Re: [PATCH] rs6000: Define movsf_from_si2 to extract high part SF element from DImode[PR89310] Message-ID: <20200711005438.GE30544@gate.crashing.org> References: <20200706021757.1118129-1-luoxhu@linux.ibm.com> <20200707001803.GR3598@gate.crashing.org> <66c7b5d6-afa6-53d7-704d-44834ff00311@linux.ibm.com> <20200707213116.GU3598@gate.crashing.org> <66faac54-0620-5ee0-ff48-5609ad9e3fa7@linux.ibm.com> <20200708224334.GY3598@gate.crashing.org> <20200709192515.GO3598@gate.crashing.org> <472e0dc4-6fc6-8d0b-2c0c-259dccd29a89@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <472e0dc4-6fc6-8d0b-2c0c-259dccd29a89@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Sat, 11 Jul 2020 00:54:42 -0000 Hi! On Fri, Jul 10, 2020 at 09:39:40AM +0800, luoxhu wrote: > OK, seems the md file needs a format tool too... Heh. Just make sure it looks good (that is, does what it looks like), looks like the rest, etc. It's hard to do anything nice with unspecs, [ ] lists do not format well. > >> + "TARGET_NO_SF_SUBREG" > >> + "#" > >> + "&& vsx_reg_sfsubreg_ok (operands[0], SFmode)" > > > > Put this in the insn condition? And since this is just a predicate, > > you can just use it instead of gpc_reg_operand. > > > > (The split condition becomes "&& 1" then, not ""). > > OK, this seems a bit strange as movsi_from_sf, movsf_from_si and > movdi_from_sf_zero_ext all use it as condition... Since in your case you *always* split, the split condition should be "always". There are no alternatives that do not split here. > And why vsx_reg_sfsubreg_ok allows "SF SUBREGS" and TARGET_NO_SF_SUBREG > "avoid (SUBREG:SF (REG:SI)", I guess they are not the same meaning? (The > TARGET_NO_SF_SUBREG is also copied from other similar defines.) Thanks. Good question. I do not know. Well... Since this define_insn* requires p8 *anyway*, we do not need any of these sf_subreg things? We always know for each one if it should be true or false. > + "TARGET_NO_SF_SUBREG" But here we should require p8 some other way, then. > + (set_attr "isa" "p8v")]) (This isn't enough, unfortunately). Segher