From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B3002388703A; Tue, 7 Apr 2020 19:03:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B3002388703A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586286215; bh=HEkM8BYCM+a7dqVZxkTuQRvNDQauoBaIO2rfHwaw6no=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BtgQC8vBm82m/HY6EEzhqVyqkKtZSt22QcSdr16PgcnRglTKicwMoxq+lsWZnuA7B Ig9kET/64tOObfga4pOvOpcTs/QN4A36SHbw0BeGhz+aX279tTFqvMDBD8VDhgcl7L UmXvQzweCIbrV3ryIIhGV9AI0uRFVivR+TyiVXww= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94211] [8/9 Regression] -fcompare-debug failure on phi-opt-13.c Date: Tue, 07 Apr 2020 19:03:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: 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: jakub at gcc dot gnu.org 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: Tue, 07 Apr 2020 19:03:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94211 --- Comment #6 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:8db876e9c045c57d2dc5bd08a6e250f822efaad0 commit r9-8464-g8db876e9c045c57d2dc5bd08a6e250f822efaad0 Author: Jakub Jelinek Date: Thu Mar 19 10:24:16 2020 +0100 phiopt: Avoid -fcompare-debug bug in phiopt [PR94211] Two years ago, I've added support for up to 2 simple preparation statem= ents in value_replacement, but the - && estimate_num_insns (assign, &eni_time_weights) + && estimate_num_insns (bb_seq (middle_bb), &eni_time_weights) change, meant that we compute the cost of all those statements rather t= han just the single assign that has been the single supported non-debug statement in the bb before, doesn't do what I thought would do, gimple_= seq is just gimple * and thus it can't be really overloaded depending on whether we pass a single gimple * or a whole sequence. Which means in the last two years it doesn't count all the statements, but only the first one. With -g that happens to be a DEBUG_STMT, or it could be e.g. the first preparation statement which could be much cheaper than the actual assig= n. 2020-03-19 Jakub Jelinek PR tree-optimization/94211 * tree-ssa-phiopt.c (value_replacement): Use estimate_num_insns= _seq instead of estimate_num_insns for bb_seq (middle_bb). Rename emtpy_or_with_defined_p variable to empty_or_with_defined_p, ad= just all uses. * gcc.dg/pr94211.c: New test.=