From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6118E385E458; Mon, 15 Jan 2024 12:19:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6118E385E458 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705321159; bh=NmtQqbXvvrtNQK3wMxJsyo9bREjx22Nt97jgkemG/GE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qNG6BjEEnSSvnCY4GoGNUOxyuo130PNWrQfR7FQ2ytLZGaastaV1V/vN7rXipi+kV tZHqaG9rgqRRly8T/5BrcJZ7YvaCYeGavn9qiwn0DHm11qkCdK7EjpihYYQ72rf0p6 n/NLR0kWt+ViqHH7SMuZV5yvDKuPJpW9TZgSmQQ0= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113372] wrong code with _BitInt() arithmetics at -O1 Date: Mon, 15 Jan 2024 12:19:18 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org 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: --- 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=3D113372 --- Comment #8 from Richard Biener --- (In reply to Jakub Jelinek from comment #6) > So, couldn't we attempt at least a partial workaround at add_scope_confli= cts > time? > I mean, for SSA_NAME uses in statements with some caching try to check if > those SSA_NAMEs may contain addresses (or because of ivopts also in > pointer-sized integers) of particular DECL_RTL_IF_SET (op) =3D=3D pc_rtx = vars or > set of them and treat those as if they were the addresses too? > I mean where we call walk_stmt_load_store_addr_ops also check uses of > SSA_NAMEs which are based on those ADDR_EXPRs and treat those similarly. > It wouldn't handle say const or pure functions taking address of some var > and say returning something based on it, but perhaps could workaround the > most common issues in the wild with stack sharing. I belive we investigated such workarounds but they didn't seem to work? Ot= her cases are concerned with address uses before loops (I think they start lifetime "correctly" now) but CLOBBERs ending lifetime inside the loop. The dataflow problem then is confused with the backedge having the object not live IIRC. So what would your workaround do? Not handle address mentions as starting live but only its (possible) memory uses?=