From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6F89C3842AD7; Thu, 30 Jun 2022 13:03:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F89C3842AD7 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106126] [12 Regression] tree check fail in useless_type_conversion_p, at gimple-expr.cc:87 since r13-1184-g57424087e82db140 Date: Thu, 30 Jun 2022 13:03:57 +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: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status 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: Thu, 30 Jun 2022 13:03:57 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106126 Martin Li=C5=A1ka changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #14 from Martin Li=C5=A1ka --- (In reply to luoxhu from comment #13) > Otherwise we need record first_bb when conditions_in_bbs->is_empty, then > check that in is_beneficial, ordered_remove the info entry if that bb is = not > the first "if condition" with side_effect statement in it, the fix would = be No, we need to record if a BB has a side effect and allow only side effects= for a first BB in the main loop in pass_if_to_switch::execute. I'm testing a pa= tch candidate. > as below, but I am not sure whether it is worth&correct way doing this to > handle both PR105740 and PR106126? Well, I replied in PR105740 where the problem is one needs to run the pass later.=