From patchwork Thu Mar 18 20:03:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 1455464 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=Y8WMSOwX; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F1dJl498xz9sWQ for ; Fri, 19 Mar 2021 07:04:07 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 922763844041; Thu, 18 Mar 2021 20:04:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 922763844041 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1616097844; bh=FLf5eV6xCDAyHR0DKvSNnbUkSYAvSpON/xGzPXyYsk0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Y8WMSOwXnqqUYDgOatEv8K6MfnPOuoEYVlcvYZqUgizwu07wnb78EqMFQ+E1JZB2C ivbgdCrlE31zcFnWkdX7WMDsgVJV8uu/0WsEmZbiMWBJAQTFw6a6sWY8NXbTULuR9H U0NKWHEcLlyKi4NcoA+PSx85QwOaMSdfjUpSJvqk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 E413F38618E2 for ; Thu, 18 Mar 2021 20:04:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E413F38618E2 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-411-u7HiNeNRNuCK4CYaxhx65A-1; Thu, 18 Mar 2021 16:03:57 -0400 X-MC-Unique: u7HiNeNRNuCK4CYaxhx65A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 74788801817 for ; Thu, 18 Mar 2021 20:03:55 +0000 (UTC) Received: from [10.10.116.80] (ovpn-116-80.rdu2.redhat.com [10.10.116.80]) by smtp.corp.redhat.com (Postfix) with ESMTP id 427D260C13 for ; Thu, 18 Mar 2021 20:03:55 +0000 (UTC) To: "gcc-patches@gcc.gnu.org" Subject: [committed] [PR99422] LRA: Use lookup_constraint only for a single constraint in process_address_1 Message-ID: <27547c3a-6d73-b83d-bef3-6d01ea8a64cb@redhat.com> Date: Thu, 18 Mar 2021 16:03:54 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, 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-Patchwork-Original-From: Vladimir Makarov via Gcc-patches From: Vladimir Makarov Reply-To: Vladimir Makarov Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" This is an additional patch for PR99422: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99422 The patch was successfully bootstrapped and tested on x86-64, ppc64le, and aarch64. commit a4670f58ebff805e35268542aac35f9791980954 Author: Vladimir N. Makarov Date: Thu Mar 18 15:58:26 2021 -0400 [PR99422] LRA: Use lookup_constraint only for a single constraint in process_address_1. This is an additional patch for PR99422. In process_address_1 we look only at the first constraint in the 1st alternative and ignore all other possibilities. As we don't know what alternative and constraint will be used at this stage, we can be sure only for a single constraint with one alternative and should use unknown constraint for all other cases. gcc/ChangeLog: PR target/99422 * lra-constraints.c (process_address_1): Use lookup_constraint only for a single constraint. diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 9205826960c..64801b6fcce 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -3459,7 +3459,12 @@ process_address_1 (int nop, bool check_only_p, constraint = skip_contraint_modifiers (curr_static_id->operand[dup].constraint); } - cn = lookup_constraint (*constraint == '\0' ? "X" : constraint); + if (*skip_contraint_modifiers (constraint + + CONSTRAINT_LEN (constraint[0], + constraint)) != '\0') + cn = CONSTRAINT__UNKNOWN; + else + cn = lookup_constraint (*constraint == '\0' ? "X" : constraint); if (insn_extra_address_constraint (cn) /* When we find an asm operand with an address constraint that doesn't satisfy address_operand to begin with, we clear