From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B36953858D20; Mon, 15 Jan 2024 11:51:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B36953858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705319473; bh=nJWTjZ3Hs1K7RM5nE+2hNF2BZGWgJ3NvKiJ53vJiFn8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YDkAMnF4vWao6ExLjAHNzVczf7naY4LmgGIymTxGdGdn3UYaUFKHXUY8K2j3RlPYT jzfgS9jDyiwh/WPrysiNKHO29KvZDcDLFAYr3pUSv1z6wEj0ACb+CZwYR78aUyHrkk 0FacQI0TJzAbZgg9uKG2O4idR6Gw6ntKhjbKOuKs= From: "jakub 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 11:51:13 +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: jakub 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 #6 from Jakub Jelinek --- So, couldn't we attempt at least a partial workaround at add_scope_conflicts time? I mean, for SSA_NAME uses in statements with some caching try to check if t= hose 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 t= hem 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_N= AMEs 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 a= nd say returning something based on it, but perhaps could workaround the most common issues in the wild with stack sharing.=