From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 22D7B385E021; Mon, 6 Apr 2020 22:52:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22D7B385E021 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586213565; bh=ndSP3iXfFtWyyx10f6zwXj2mgvZDIKxWZlh3n7o1Snw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uMEijHQ7DGzqsNBujzOFdj2nrAjXFgbqtfxJDDmmcaP5jIXVEHRJw783k5nWHeVay jkbrVMzK3VMOBOhsjWXpXqsHxdp2V7XejKa84Yxys9BJkTkFbJYBP6cYzrwF6VxeBL 5SyyDPkLEizAYq2niyeK5CNbq3lgPcm+z4no1EBM= From: "law at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/90275] [8/9/10 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce Date: Mon, 06 Apr 2020 22:52:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: law at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: law at redhat dot com X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2020 22:52:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D90275 --- Comment #21 from Jeffrey A. Law --- So we may be able to address this by setting "do_not_record" if we have multiple sets in an insn, one of which is a reg->reg copy to a destination = that is mentioned in a REG_UNUSED note. We'd only need to set it when processing the set with the destination referenced in the REG_UNUSED note. If the sets were in different insns, then the reg->reg copy with an unused destination would be removed as dead. If the source of the set were anything but a register, then we wouldn't be getting into the insert_regs routine with the validation check we're trippi= ng. I suspect there's still a problem if we have multiple sets, one of which is= a nop set. We may want to proactively address this case too, even if we don't have a C testcase which triggers it.=