From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E647338515F9; Fri, 17 Mar 2023 18:17:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E647338515F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679077029; bh=CPMjd8YiWh7CGRmbyfaZDIs5wlc6OQKu+MovYH+3Hyw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IBKNAe4GyCwXr4m91/zNtuldTUt3uoWhSBDlNh26J8NiJCydifIk+W8GvKBL/M3ej iuV+8veANrtzPrHs68A0Tbsagzg/GMEPKNmfUAqOZ3OoZf4vHPsBirbuCMProCvPUq E+ZEA/kSYAHiPGuJa9aI2Q45RR+NQp1S21a7L+Js= From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108419] [13 Regression] Dead Code Elimination Regression at -O2 since r13-440-g98e475a8f58 Date: Fri, 17 Mar 2023 18:17:09 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: amacleod at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D108419 --- Comment #4 from Andrew Macleod --- Not easily. I have started working on a phi analyzer for ranger to assist w= ith various issues like this.=20 It will analyze phi patterns to weed out the ssa-names that are just copies, and then allow the few remaining ssa-names that actually change the values = in the phi seqeuence to be looked at more easily. It will help develop better initial ranges. So cases where the non-phi names are starting value and an increment or decrement can start with something better than VARYING. This will help with cases like https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107986 It can help identify cases where values will have restricted smallish range= s, such as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107822.=20=20 Cases like this one with the second IV are trickier as there isnt a relatio= n to dicover between the two IVs... at leats not easily.=20 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107639 is a case like that t= oo I think. When there are 2 IVs I dont suppose there is any way to indicate there is a connection? then if we can end up counting one, we might be able to do something with the other.=