From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7CF503857C4B; Wed, 6 Mar 2024 14:58:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7CF503857C4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709737080; bh=zwGU0Y1glHXrL50UqtSTT37Sg0c9+eNMNLcQzf093fQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RAT8Ii2XB8oUW+vXFtX75dyh4F6ov69CqM7pwoZuQIsSUtfGAX2yrKZnj+P3U62b8 yvuiy/1l0ekZ0wPK6xLyu0tlufUcz0dBNJgLrGozKst3pgWgfDZab3zkfQPDRnXwdC +VCI7XpJITivBEEbJQ9RlXUV9dycdSfrgLWnCeJM= From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114151] [14 Regression] weird and inefficient codegen and addressing modes since r14-9193 Date: Wed, 06 Mar 2024 14:57:58 +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: 14.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: 14.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=3D114151 --- Comment #12 from Andrew Macleod --- (In reply to Richard Biener from comment #11) > (In reply to Richard Biener from comment #10) > > (In reply to Andrew Macleod from comment #9) > > > Created attachment 57620 [details] > > > proposed patch > > >=20 > > > Does this solve your problem if there is an active ranger? it bootst= raps > > > with no regressions > >=20 > > I'll check what it does. >=20 >=20 > So the important part is that it got the fact that _12 is positive. As > analyzed in earlier comments I think that's all we can do, we don't know > anything about the other variable involved and thus can't avoid the > unsigned punning during SCEV analysis. Yeah, I wouldn't want to invoke any dynamic lookup changes at this point. t= hat would be too hard to predict or contain. I will continue poking at what = is triggering the loop issues because I think its a good longer term solution = to have range_of_expr with no context to invoke range_of_stmt if the DEF is in= the IL and has not been processed.=20 >=20 > I think it's a good change, let's keep it queued for stage1 at this point > unless we really know a case it helps to avoid a regression with > r14-9193-ga0b1798042d033 >=20 > For testing, what's the "easiest" pass/thing to do to recompute global > ranges now? In the past I'd schedule EVRP but is there now a ranger > API to do this? Just to see if full global range compute before IVOPTs > would help. all VRP passes are the same now. so just schedule EVRP. in theory, you co= uld schedule the fast vrp pass I added, but its not heavily tested... but you c= ould try it. It doesnt do any back edges or switches (iirc), but does basic calculations in DOM order and exports/updates globals. NEXT_PASS (pass_fast_vrp)=