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 [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id F043F385802D for ; Mon, 2 Nov 2020 19:40:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F043F385802D 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-258-HXmRjc6TNKKriV_8V-NOZg-1; Mon, 02 Nov 2020 14:40:11 -0500 X-MC-Unique: HXmRjc6TNKKriV_8V-NOZg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EC92E186840D; Mon, 2 Nov 2020 19:40:09 +0000 (UTC) Received: from [10.10.113.2] (ovpn-113-2.rdu2.redhat.com [10.10.113.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2EBB05B4AF; Mon, 2 Nov 2020 19:40:08 +0000 (UTC) Subject: Re: [PATCH][PR target/97540] Don't extract memory from operand for normal memory constraint. To: Hongtao Liu , GCC Patches Cc: "H. J. Lu" , dcb314@hotmail.com, Jeff Law , Richard Sandiford References: From: Vladimir Makarov Message-ID: <382b6c32-bc33-6668-52e1-b8ee94ffe9ce@redhat.com> Date: Mon, 2 Nov 2020 14:40:08 -0500 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.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No, score=-7.2 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_H5, 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-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: Mon, 02 Nov 2020 19:40:15 -0000 On 2020-10-27 2:53 a.m., Hongtao Liu wrote: > Hi: > For inline asm, there could be an operand like (not (mem:)), it's > not a valid operand for normal memory constraint. > Bootstrap is ok, regression test is ok for make check > RUNTESTFLAGS="--target_board='unix{-m32,}'" > > gcc/ChangeLog > PR target/97540 > * ira.c: (ira_setup_alts): Extract memory from operand only > for special memory constraint. > * recog.c (asm_operand_ok): Ditto. > * lra-constraints.c (process_alt_operands): MEM_P is > required for normal memory constraint. > > gcc/testsuite/ChangeLog > * gcc.target/i386/pr97540.c: New test. > I understand Richard's concerns and actually these concerns were my motivations to constraint possible cases for extract_mem_from_operand in the original patch introducing the function. If Richard proposes a better solution we will reconsider the current approach and revert the changes if it is necessary. Meanwhile I am approving this patch.  I hope it will not demotivate Richard's attempt to find a better solution.