From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id D5BB6398744E for ; Thu, 22 Oct 2020 21:30:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D5BB6398744E Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-475-PPxEGxOSMAGgVOaAKKe-fA-1; Thu, 22 Oct 2020 17:30:11 -0400 X-MC-Unique: PPxEGxOSMAGgVOaAKKe-fA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 15FA61006CA8; Thu, 22 Oct 2020 21:30:10 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-84.phx2.redhat.com [10.3.112.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC0546EF48; Thu, 22 Oct 2020 21:30:08 +0000 (UTC) Subject: Re: How to recognize registers after reload ?. To: Henri Cloetens , gcc-help References: From: Jeff Law Message-ID: Date: Thu, 22 Oct 2020 15:30:08 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Thu, 22 Oct 2020 21:30:16 -0000 On 10/22/20 2:02 AM, Henri Cloetens wrote: > Hello all, > > I have an issue with my custom compiler back-end after reload. > > 1. The machine has move-instructions that can do following: >    a. From register file to (register indirect offset) or to register > file. >    b. From (register indirect offset), register file, immediate to > register file > > 2. I have now 3 patterns to emit moves in the .md-file: > >     1. movesi_internal_fromreg (from register file to memory or > register file) >     2. movesi_internal_toreg (from memory , immediate, register file > to register file) >     3. movesi : define_expand. It has C-code that analyses the > operands and selects 1,2 or both. > > Motivation for the split was problems with the "combine" step. Suppose > following code: >     *a = 10. >     Even if my front_end (define_expand) splits this in >     r100 = 10 >    *r101 = r100 >    the combine step, if these is only one movesi_internal, willl group > it again, to then find out >    there is no instruction pattern. This is an indication the insn's condition or operand's predicate or operand constraints are wrong. Jeff