From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 92DC93858D32; Tue, 2 Apr 2024 08:44:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92DC93858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712047449; bh=ydfuAw6xu90Xc/nVh5n5xg2aKAek4Wo/PEB+xk+niHU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p0cNOvyY/GUl1h1e25ZurJp9RKX+onELCz6VvGxtmKZQ8X5cgUOxKsinAR5fCS7HG kuJugKP/MqXzt0UiTB4NYMvO4JP9YrWpNLr5fYjSitd8HyR2nnBlFJGt3439Cpxp6X /9ePxKC5Q8So2FDgdQJRCqRRxZ9Yf++LOHjrkRb8= From: "hubicka at ucw dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/113907] [11/12/13/14 regression] ICU miscompiled on x86 since r14-5109-ga291237b628f41 Date: Tue, 02 Apr 2024 08:44:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at ucw dot cz X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: hubicka 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=3D113907 --- Comment #70 from Jan Hubicka --- Hello, over easter I did some analysis of the cases where ICF is now disabled due to jump function miscompare. Most common case (seen also on GCC) is the situation where function is originally static inline and in some units its callee is known which enables us to propagate return value range. It happens on wide int implementaiton but it is not that importnat. Other case is when function has address taken of local label and ICF two functions taking address of local label and passing it to a calle (maybe we should not but C standard says nothing). I tought there is also case where jump function has other function local stuff, but that does not happen since we avoid putting them to jumptables (to avoid need to stream function blocal BLOCKS). Last case is that the function takes as parameter an address of static symbol that can be merged. We currently don't do that since we miss any logic tracking whether value address is eventually used to compare. So I think for release branchs and trunk Martin's patch is fine. For next stage1 we will need to work on using icf's compare_op in the ipa-prop code and also add merging of value ranges. Honza=