From patchwork Mon May 6 08:34:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Hua X-Patchwork-Id: 1095718 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-500129-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="kSa/P6IE"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="WQuOY8qe"; 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 44yGHw3zRHz9s9N for ; Mon, 6 May 2019 18:34:33 +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 :mime-version:from:date:message-id:subject:to:cc:content-type; q=dns; s=default; b=g5EalETyRYLYMWWZZcaZ5e+3gTOi2AqPMogHYc0/KpY mVi7wMLAr6aNxmpahiZkepbQBkgnBMJodSVbGR/pRhQ5hVHZLAZhEFCv7QqO4zpX 92h3UD3XEWDdijBZm4sbuX4r+dME7AJuPl6sGhDnEEVvkkgM/iNNNOGM7FPBjWlI = 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 :mime-version:from:date:message-id:subject:to:cc:content-type; s=default; bh=ISWWBINa3aqm16FVuTd/Lt+xlE8=; b=kSa/P6IECrFK3FGbj BW9f2kQcQetP5JiNDWYPXiS4t5kfkKQeGC+48WiV6OkVMPY70a0krq+PlL1p8wp2 H7iLjc2+LY1N3u3OdVjZSp80aQcvvW9MnA0/LfPR0bmK2lLQD1kYOogYo/2Yj1to YodDiOjV6YiHGdsiUwY6gpNsAQ= Received: (qmail 70370 invoked by alias); 6 May 2019 08:34:27 -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 70361 invoked by uid 89); 6 May 2019 08:34:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Gm-Message-State:APjAAAW, HX-Received:6602 X-HELO: mail-io1-f44.google.com Received: from mail-io1-f44.google.com (HELO mail-io1-f44.google.com) (209.85.166.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 May 2019 08:34:25 +0000 Received: by mail-io1-f44.google.com with SMTP id z4so3743850iol.0 for ; Mon, 06 May 2019 01:34:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=iw+3i+Zw2sL2W42A2nnrlkzRuvU/fOJBQCzBWNd3ynw=; b=WQuOY8qeqBvEE73M34rpp5cjSKmFHlmXbcO2/YPXdoa0hm0d4hdL/NBaRYjDkko4n1 Ka0+DcPZVkLnGxs6n8719HFnqKVpQMZQBeV7VG/65kLxSwMk4AiG3AmeHSjRwN92/IWF fdCKyNPVII3Umu1Cb0IjfWQIGLx/5eQmIZdO/WMy9KuOmUt8TDJ3HBB/gbHph56VCL/0 AFZvlvmsDkgumc9Cy5Ot0I/IvzRNnVQUQ1WeWGtvGKyHreuP1cRLRlJQqefunwDcLuXX CO3r3ypMuj7kYdZuk7WeoN6p1jpw9zDWcVRiL8udqkbGz16wEqiLHXe/DRPRvKHdNwNC 0YaQ== MIME-Version: 1.0 From: Paul Hua Date: Mon, 6 May 2019 16:34:12 +0800 Message-ID: Subject: [PATCH] [MIPS] Fix PR/target 90357 20080502-1.c -O0 start with r269880 To: gcc-patches Cc: "Jeff Law (law@redhat.com)" X-IsSubscribed: yes The attached patch fix pr90357, bootstraped and regressed test on mips64el-linux-gnu target. Ok for commit ? From a3db8763ee8460a5f63c567d58624a985f9924ce Mon Sep 17 00:00:00 2001 From: Chenghua Xu Date: Mon, 6 May 2019 16:14:56 +0800 Subject: [PATCH] [PATCH,MIPS] Skip forward src into next insn when the SRC reg is dead. PR target/90357 gcc/ * config/mips/mips.c (mips_split_move): Skip forward SRC into next insn when the SRC reg is dead. --- gcc/config/mips/mips.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 1de33b2..89fc073 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -4849,6 +4849,7 @@ mips_split_move (rtx dest, rtx src, enum mips_split_type split_type, rtx insn_) can forward SRC for DEST. This is most useful if the next insn is a simple store. */ rtx_insn *insn = (rtx_insn *)insn_; + struct mips_address_info addr; if (insn) { rtx_insn *next = next_nonnote_nondebug_insn_bb (insn); @@ -4856,7 +4857,17 @@ mips_split_move (rtx dest, rtx src, enum mips_split_type split_type, rtx insn_) { rtx set = single_set (next); if (set && SET_SRC (set) == dest) - validate_change (next, &SET_SRC (set), src, false); + { + if (MEM_P (src)) + { + rtx tmp = XEXP (src, 0); + mips_classify_address (&addr, tmp, GET_MODE (tmp), true); + if (REGNO (addr.reg) != REGNO (dest)) + validate_change (next, &SET_SRC (set), src, false); + } + else + validate_change (next, &SET_SRC (set), src, false); + } } } } -- 1.8.3.1