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 8F4A03858012 for ; Fri, 23 Oct 2020 10:21:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8F4A03858012 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 09NAKYi6030295; Fri, 23 Oct 2020 05:20:34 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 09NAKY42030292; Fri, 23 Oct 2020 05:20:34 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 23 Oct 2020 05:20:34 -0500 From: Segher Boessenkool To: stefan@franke.ms Cc: "'gcc-help'" Subject: Re: How to recognize registers after reload ?. Message-ID: <20201023102034.GA2672@gate.crashing.org> References: <20201022222438.GX2672@gate.crashing.org> <82fed76c-e343-a155-4b3d-ef8ab07d2baf@redhat.com> <734be852-33ed-ee19-88a9-99a5905db5cf@blueice.be> <0cd001d6a90f$0fd96f80$2f8c4e80$@bebbosoft.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0cd001d6a90f$0fd96f80$2f8c4e80$@bebbosoft.de> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-6.7 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.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Oct 2020 10:21:39 -0000 On Fri, Oct 23, 2020 at 09:35:20AM +0200, Stefan Franke wrote: > it seems your define_expand for movsi is too narrow. It should accept all mandatory forms. The distinction - to register/memory - should be done in movsi itself. There is also no need for a database to distinguish. The requirement is that reload (which should be LRA on all newer ports, and is recommended for all ports) always has a path to reload whatever is thrown at it. This does mean you need both r->m and m->r in one pattern normally, yes (all r's can be spilled to stack, and there is no m->m instruction). Of course you get by far the best code if you do have all normal moves in one pattern (one per mode), as you say. You disallow m->m in the insn condition, like "gpc_reg_operand (operands[0], SImode) || gpc_reg_operand (operands[1], SImode)" Segher