From patchwork Thu Mar 29 18:32:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 892919 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-475623-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="WbtwPFsj"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40BtdV38Nsz9s0b for ; Fri, 30 Mar 2018 05:32:12 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=Jf4Wa9XcvpgU2MqdqiK3swVp6nV8BK8M24HATJf3fkwzDHeJrt iU/DcMvbLCTk4mFPlfYFpVKo2pP5MsZmsG6t15I2bIxHERZciXbwh0JUA0rUZwUA 10N1J8PWOojvKc1mKAP3ES9Y7kPY5SJTnJm34tk2m1iiqdRK18i42tCjA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=nlT3wqw/cZejp5vQg98/Y9z4DuI=; b=WbtwPFsjxQsuYp/3Zr+U YupGJLo9es9Np3ky2470wKDvYOaKWiR/odso0nKckieugySYql2yupDkQId82CDt Eqc8dfnwsZDCI2CD2U60kyqreRvjosj82ZEhN7B8QOyHf/FeGyewGd52bwdS5H2x vANVQx/AVf26SnBkJ894qSg= Received: (qmail 96080 invoked by alias); 29 Mar 2018 18:32:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 96005 invoked by uid 89); 29 Mar 2018 18:32:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-9.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, KAM_SHORT, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Mar 2018 18:32:03 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CDFE54077EED for ; Thu, 29 Mar 2018 18:32:01 +0000 (UTC) Received: from topor.usersys.redhat.com (unused-10-15-17-214.yyz.redhat.com [10.15.17.214]) by smtp.corp.redhat.com (Postfix) with ESMTP id B08CA8443C for ; Thu, 29 Mar 2018 18:32:01 +0000 (UTC) To: gcc-patches From: Vladimir Makarov Subject: patch for PR84985 Message-ID: <0a46af2d-f404-e34f-0c04-be6ed4d2e3be@redhat.com> Date: Thu, 29 Mar 2018 14:32:01 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 X-IsSubscribed: yes The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84985   The patch was successfully bootstrapped and tested on x86-64.   Committed as rev. 258961. Index: ChangeLog =================================================================== --- ChangeLog (revision 258960) +++ ChangeLog (working copy) @@ -1,3 +1,9 @@ +2018-03-29 Vladimir Makarov + + PR inline-asm/84985 + * lra-constraints.c (process_alt_operands): Move setting + this_alternative_matches below. + 2018-03-29 Martin Liska PR lto/84995. Index: testsuite/ChangeLog =================================================================== --- testsuite/ChangeLog (revision 258960) +++ testsuite/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2018-03-29 Vladimir Makarov + + PR inline-asm/84985 + * gcc.target/i386/pr84985.c: New. + 2018-03-29 David Malcolm PR c++/85110 Index: lra-constraints.c =================================================================== --- lra-constraints.c (revision 258820) +++ lra-constraints.c (working copy) @@ -2126,7 +2126,6 @@ process_alt_operands (int only_alternati && curr_operand_mode[m] != curr_operand_mode[nop]) break; - this_alternative_matches = m; m_hregno = get_hard_regno (*curr_id->operand_loc[m], false); /* We are supposed to match a previous operand. If we do, we win if that one did. If we do @@ -2228,6 +2227,7 @@ process_alt_operands (int only_alternati else did_match = true; + this_alternative_matches = m; /* This can be fixed with reloads if the operand we are supposed to match can be fixed with reloads. */ Index: testsuite/gcc.target/i386/pr84985.c =================================================================== --- testsuite/gcc.target/i386/pr84985.c (nonexistent) +++ testsuite/gcc.target/i386/pr84985.c (working copy) @@ -0,0 +1,6 @@ +/* { dg-do compile } */ +/* { dg-options "-O0" } */ +int main() { + int a; + asm("" : "=d"(a) : "0"(a), "0ae"(&a)); +}