From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 40143385B52C; Wed, 22 Mar 2023 16:05:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 40143385B52C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679501106; bh=Po4b6lIZd+9MV8y7JfyJg6o0ohRuw6dLMtpJv7PZJdY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TGFeu/nC9Tj1KSf/IoKDcyj4RgHKxcn93zLltA4PoWgrwmHRBaTYpmn6ZU5qd437n 9UOZkE1rZLND/g6mBgeiqOYvU66AJRXKpLXTRuC0QnY3c8BUHuz2sCkcSD673zkQKe RDSpBmgbI+wtaoas0ff67cm57matvIcBOgss1fS0= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/107925] ICE in update_specialized_profile at gcc/ipa-cp.cc:5082 for 531.deepsjeng_r benchmark Date: Wed, 22 Mar 2023 16:05:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jamborm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107925 --- Comment #11 from CVS Commits --- The releases/gcc-12 branch has been updated by Martin Jambor : https://gcc.gnu.org/g:c826442f6651bab6f66d3107fb02d38eacbf900e commit r12-9308-gc826442f6651bab6f66d3107fb02d38eacbf900e Author: Martin Jambor Date: Wed Mar 22 16:59:45 2023 +0100 ipa-cp: Fix various issues in update_specialized_profile (PR 107925) The patch below fixes various issues in function update_specialized_profile. The main is removal of the assert which is bogus in the case of recursive cloning. The division of unexplained counts is guesswork, which then leads to updates of counts of recursive edges, which then can be redirected to the new clone and their count subtracted from the count and there simply may not be enough left in the count of the original node - especially when we clone a lot because of using --param ipa-cp-eval-threshold=3D1. The other issue was omission to drop the count of the original node to ipa count. And when calculating the remainder, we should use lenient_count_portion_handling to account for partial train runs. Finally, the patch adds dumping of the original count which I think is useful. gcc/ChangeLog: 2023-02-17 Martin Jambor PR ipa/107925 * ipa-cp.cc (update_specialized_profile): Drop orig_node_count = to ipa count, remove assert, lenient_count_portion_handling, dump also orig_node_count. (cherry picked from commit 68ba253bda74d6c6e77726d98184a6faee5e7337)=