From patchwork Wed Aug 21 07:25:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 1150617 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-507410-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="ROVwWgO+"; 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 46CzjQ66ghz9sRL for ; Wed, 21 Aug 2019 17:26:01 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=AtHQiYw1nIKNyXqmFPXDwh0AKU07pOr2crkpfFauYvRM6Vf4cFclr S9YmJxwK9hwifg49rXPQaJz8zChcXx7X8WfUzB9vL0sKplnmgnUIb61bDI6SFi/p ZO7c2u2XHtP/2mBoNqg9RKFV60vxP6hXLbhPK/VWBXAOQXlSlvs5qg= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=KqXQAKlS4te57U1Xv8mRqWkrU5c=; b=ROVwWgO+CtK2TDkONXk8 vK/DMKfhb11rFubSCgQA5MHwUc4brY1fCn1N2cZS/B5cSXl+OuEA24UIO+eBUw3j 3M5tcbyVD8uvY7TIRv9oovbFxBjPyEh04c5C5u3XdWJcMznIcDn2LgSCMiG7p6U3 nKyAnN2yNGRTqmnvJjUlMRk= Received: (qmail 90492 invoked by alias); 21 Aug 2019 07:25:50 -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 90484 invoked by uid 89); 21 Aug 2019 07:25:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=Copy X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Aug 2019 07:25:48 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C9699B027 for ; Wed, 21 Aug 2019 07:25:46 +0000 (UTC) Date: Wed, 21 Aug 2019 09:25:46 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix invalid RTL sharing caused by STV changes Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 I am testing the following and will commit it as obvious. Richard. 2019-08-21 Richard Biener PR target/91498 * config/i386/i386-features.c (general_scalar_chain::make_vector_copies): Copy stack temporary rtx when using it multiple times. (general_scalar_chain::convert_reg): Likewise. Index: gcc/config/i386/i386-features.c =================================================================== --- gcc/config/i386/i386-features.c (revision 274764) +++ gcc/config/i386/i386-features.c (working copy) @@ -706,7 +706,7 @@ general_scalar_chain::make_vector_copies gen_rtx_SUBREG (SImode, reg, 4)); } else - emit_move_insn (tmp, reg); + emit_move_insn (copy_rtx (tmp), reg); emit_insn (gen_rtx_SET (gen_rtx_SUBREG (vmode, vreg, 0), gen_gpr_to_xmm_move_src (vmode, tmp))); } @@ -810,7 +810,7 @@ general_scalar_chain::convert_reg (unsig adjust_address (tmp, SImode, 4)); } else - emit_move_insn (scopy, tmp); + emit_move_insn (scopy, copy_rtx (tmp)); } else if (!TARGET_64BIT && smode == DImode) {