From patchwork Wed Dec 12 20:22:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Segher Boessenkool X-Patchwork-Id: 1012257 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-492291-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="QI4hizwY"; 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 43FSsN4VR1z9s2P for ; Thu, 13 Dec 2018 07:22:14 +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:from :to:cc:subject:date:message-id; q=dns; s=default; b=ENckaLHfnkUO xqnBtdrF55bwXEo5ZUM43E7dTOBGbb3/5vciKmL/mN1xDySaY6uU/27kmO5wRc18 aGqjpwpBqgcNUM8FhI1aRnmtrt1BHNiaD3OO6ilu6EuSWMTkMwP5/EBPtY8X2Xn8 MLQozFbsHfKGaMmiN4ilzRmlEmQC7Mg= 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:from :to:cc:subject:date:message-id; s=default; bh=4muaA4n+E5onnaJH1Q 4w/9bX2eo=; b=QI4hizwYC1GT6RUhnzE/yiVDmHjaC5kbcz6DQaRtS0kmAerOtH /lh5sEcTjLVbsbBZtQKvOdMH2Revk3fM/2Sd/SWVwiQlmFqqS5ZwM1tmrGvHVerK L5WgiNtZTpXc/p8Vdssf+kbnheSXqBPgDgw/kmO3GIOW/uQ9WNf33nW0k= Received: (qmail 401 invoked by alias); 12 Dec 2018 20:22:08 -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 130673 invoked by uid 89); 12 Dec 2018 20:22:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=temporarily, copy_rtx X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Dec 2018 20:22:06 +0000 Received: by gcc1-power7.osuosl.org (Postfix, from userid 10019) id 7CEBC124040A; Wed, 12 Dec 2018 20:22:04 +0000 (UTC) From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: Segher Boessenkool Subject: [PATCH] match_asm_constraints: Use copy_rtx where needed (PR88001) Date: Wed, 12 Dec 2018 20:22:02 +0000 Message-Id: <18b30d3165091109ed6a32d8521ecaa1e6676fd7.1544645282.git.segher@kernel.crashing.org> X-IsSubscribed: yes The new insn here (temporarily) illegally shares RTL. This fixes it. Tested with an ARC cross, and regstrapped on powerpc64-linux {-m32,-m64}. Is this okay for trunk? Segher 2018-12-12 Segher Boessenkool PR rtl-optimization/88001 * function.c (match_asm_constraints_1): Don't invalidly share RTL. --- gcc/function.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/function.c b/gcc/function.c index 69523c1..60e96f3 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -6529,7 +6529,7 @@ match_asm_constraints_1 (rtx_insn *insn, rtx *p_sets, int noutputs) output_matched[match] = true; start_sequence (); - emit_move_insn (output, input); + emit_move_insn (output, copy_rtx (input)); insns = get_insns (); end_sequence (); emit_insn_before (insns, insn);