From patchwork Mon Oct 8 22:23:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameera Deshpande X-Patchwork-Id: 148462 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4178556lji; Mon, 8 Oct 2018 15:24:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV60VDyT2cSmqFLihllQRahbYICcLbipg0UslplTG1k5VyqQG+rZ8s5m1M9Y3ghfhjomePq62 X-Received: by 2002:a63:5353:: with SMTP id t19-v6mr22682661pgl.199.1539037497150; Mon, 08 Oct 2018 15:24:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539037497; cv=none; d=google.com; s=arc-20160816; b=k/WwNxQ4rzL/zVUWkKMPcOE6Pxq2HpJFJyRYGTksL/bxYMYrveCmj0Tw2vE9kDP47O 1C4ce1y6qNcODWWjMFzeLd6mOmTbDoR/REwc8aFO4lkQJaLC5oO79poUsn3B7IWHLp80 u9wBGoJPeXa7d3sW9aYpR/6F7CF1cWhpFFhnjQvkjt8wSyhBOyzcz3g37jF3pQ2AHHP+ 6BMNZ5ci+MsdjGVBiyd+S0/qU91Eqma1zDzunva9dfwyJGVa1+5/cwSDgUI4ZA6/Euas YAeAXvfdmXtMDLbWCQvdjj20C8pZDi9y6sqt7/LRFu+HvwFPMzfz+hf4aaRk37elgaUm tbqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:mime-version:dkim-signature :delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature; bh=SoumCeQvEqNAFwL0C6xH7e5ub4Ix+oOdcoMmV6pXkB0=; b=TAFDRg8LMU5we2F6FH3Vh6aVCuzmn0MDhyTqLoNme379MhHJIkMz4IAlUvEMKl9zC1 I83amuORzoJ3+AR33qHpPq6IJLabhO+llkzR42CDwdmEhlADnDRf89DicMZ7gswxlhYx uXeTxFmM+5RenOGgVg9OBEtzje0YVhMI6EVMPTuRj8HHimEnh16Fpq1xQMlqw0GfQfm9 nxmiDPVc0bwDLn3gNo5JZ7qn17/bu97TYxuM0yXgLUglFa8OwN8Zd/30RDSxUZ/9aPZL U3kzU3GxBSPYGmm7H9uL0NQS32fAq4Zex1fVPeV7kECaxSdKVWB7m3jxfHoApYnt6EqV qW0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=SbUaI7NG; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="S88/Rizo"; spf=pass (google.com: domain of gcc-patches-return-487168-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-487168-patch=linaro.org@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id m66-v6si13087471pfm.191.2018.10.08.15.24.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Oct 2018 15:24:57 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-487168-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=SbUaI7NG; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="S88/Rizo"; spf=pass (google.com: domain of gcc-patches-return-487168-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-487168-patch=linaro.org@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=EumjyF4XKMrXajl6X4nkB/S0WfVxzsf2pOShe4sWAim OokBXVGWIPmXqaewS+lcnHEBclX3hJFCmL4Ycg7nx3N4yEwNArUCrTdUMJoN+r38 6bvOMJw2CxL0dpG4lF1d8O8/q+po1+mYumdidVolXxXJqyxwg1dgH0zlnBPXYw3Y = 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=B+eOFCOtkW0JQPeCiEsXn2r9f4M=; b=SbUaI7NGZO2Rb+mCn rd00oR2YhAApP2zqZgj1JkLJd4fMTATKWHNrnLx9lv2mLtaylMzcDSUzn69EIEvg lzxOQUdoyU3wT2mIjfZ6lUr2mGjzis62XUDU5Q5mz8a044Z0zQSV7ZRdMHYmD+Cv pwfgFSC4y+PKvMFTztd7/ekPlQ= Received: (qmail 115574 invoked by alias); 8 Oct 2018 22:24:36 -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 114988 invoked by uid 89); 8 Oct 2018 22:24:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1887, HTo:U*vmakarov X-HELO: mail-ot1-f54.google.com Received: from mail-ot1-f54.google.com (HELO mail-ot1-f54.google.com) (209.85.210.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 08 Oct 2018 22:24:03 +0000 Received: by mail-ot1-f54.google.com with SMTP id l1so8194311otj.5 for ; Mon, 08 Oct 2018 15:24:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=rQ3ZHfRUlaqnB90OLISldc4dKn6Cq90BXzdMSgfkJLQ=; b=S88/RizoITJpOJzu3n+p5WQA5kusDhCcEgiDD3FKkO8GlrX6nnnEr7/FFYApWC5jZu sa6QVVbSUd1Z1OTaTn+9mhLCOdwsHHe8W4Tl+GMC3V38mQoXAWQlm4YDbHa5b56XteU4 Wu3ZFx7QbKsqhdAJcBxbawLvCm2v50g0nfijM= MIME-Version: 1.0 From: Sameera Deshpande Date: Tue, 9 Oct 2018 03:53:50 +0530 Message-ID: Subject: [Patch, regrename] Fix PR87330 : ICE in scan_rtx_reg, at regrename.c To: vmakarov@redhat.com, bergner@vnet.ibm.com, zadeck@naturalbridge.com, seongbae.park@gmail.com Cc: gcc-patches X-IsSubscribed: yes Hi! Please find attached the patch fixing the issue PR87330 : ICE in scan_rtx_reg, at regrename.c:1097. The regrename pass does not rename the registers which are in notes, because of which the REG_DEAD note had previous register names, which caused conflicting liveness information generated for tag collision pass. It is better to do it in regrename_do_replace instead while regrename_analyze, because the note information does not really contribute into the regrename analysis, hence need not be added in the def-use chains that are computed. regrename_do_replace is where the decision to finally rename the register is made - where the note can be altered with new regname. Other notes need not be changed, as they don't hold renamed register information. Ok for trunk? Changelog: 2018-10-09 Sameera Deshpande loc); struct reg_attrs *attr = REG_ATTRS (*chain->loc); int reg_ptr = REG_POINTER (*chain->loc); + rtx note; if (DEBUG_INSN_P (chain->insn) && REGNO (*chain->loc) != base_regno) validate_change (chain->insn, &(INSN_VAR_LOCATION_LOC (chain->insn)), @@ -986,6 +987,11 @@ regrename_do_replace (struct du_head *head, int reg) last_reg = *chain->loc; } validate_change (chain->insn, chain->loc, last_repl, true); + note = find_regno_note (chain->insn, REG_DEAD, base_regno); + if (note != 0) + { + validate_change (chain->insn, &XEXP (note, 0), last_repl, true); + } } }