From patchwork Wed Mar 10 21:20:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 1450807 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=DG/jn4sd; 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 4DwlNK0g0qz9sS8 for ; Thu, 11 Mar 2021 08:20:14 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5C9513857C5E; Wed, 10 Mar 2021 21:20:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C9513857C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1615411211; bh=jk+u8XjffdTiOnK1l4StPMAiSSDkQZDfVJPoKxJQ0Oc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=DG/jn4sdJHQDOM21Wn+Ds6sEt8UWbpCAtCaiAnrA5p7rw/dZ63Q01qTHOioS/5HEf YZxBjtWUbN6Jp/r40iQYYNYsuWJw6+n/vwLWSDrkn0E6US0thylVoxtikUXtMsZf6G /fZDokwePOV4LanZKT3ZtBdzs6hHXeaFc5GI4ak8= 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 [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 4393B3858020 for ; Wed, 10 Mar 2021 21:20:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4393B3858020 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-268-Ry3jdnDWMVem3RE0-o9vVw-1; Wed, 10 Mar 2021 16:20:06 -0500 X-MC-Unique: Ry3jdnDWMVem3RE0-o9vVw-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 8F4308015BE for ; Wed, 10 Mar 2021 21:20:05 +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 5571A60C13 for ; Wed, 10 Mar 2021 21:20:05 +0000 (UTC) To: "gcc-patches@gcc.gnu.org" Subject: [committed] [PR99422] LRA: Don't check unknown constraint, use X for empty constraint Message-ID: <5a060c50-e578-44f9-cab2-59ed4a46ccdb@redhat.com> Date: Wed, 10 Mar 2021 16:20:04 -0500 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.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, 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-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" Here is one more patch for PR99422.  The patch was successfully tested and bootstrapped on x86-64. commit e647130d441887657cf0e1c2c3b40ab1ca9beb47 (HEAD -> master) Author: Vladimir N. Makarov Date: Wed Mar 10 16:15:08 2021 -0500 [PR99422] LRA: Don't check unknown constraint, use X for empty constraint Using CONSTRAINT__UNKNOWN was a bad idea, although it triggered a lot hidden bugs. It is better to use X instead of empty constraint. gcc/ChangeLog: PR target/99422 * lra-constraints.c (process_address_1): Don't check unknown constraint, use X for empty constraint. diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 05cb493852f..9205826960c 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -3459,7 +3459,7 @@ process_address_1 (int nop, bool check_only_p, constraint = skip_contraint_modifiers (curr_static_id->operand[dup].constraint); } - cn = lookup_constraint (constraint); + 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 @@ -3475,9 +3475,8 @@ process_address_1 (int nop, bool check_only_p, i.e. bcst_mem_operand in i386 backend. */ else if (MEM_P (mem) && !(INSN_CODE (curr_insn) < 0 - && ((cn == CONSTRAINT__UNKNOWN && *constraint != 'g') - || (get_constraint_type (cn) == CT_FIXED_FORM - && constraint_satisfied_p (op, cn))))) + && get_constraint_type (cn) == CT_FIXED_FORM + && constraint_satisfied_p (op, cn))) decompose_mem_address (&ad, mem); else if (GET_CODE (op) == SUBREG && MEM_P (SUBREG_REG (op)))