From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9B5973858CD1; Mon, 11 Mar 2024 11:21:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9B5973858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710156086; bh=W8tx0/diwoT0NybsBmrvu1JSv8itudCxuH8zXDDU1RI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kq/NWUceRIGZHbZMgcHdFBUaNfKWudoCnFNoz1NRkt30iebI5a32tCV51N1iTJGnp CRJ+3NfeVPgslVDQjEqFco3LxsADXFqaTx+AxgdxfeflJAat1byCVN1i8yljW0+NDr t0EUfRTZmIlKFxMnBibvTCOLlUIfp6aiwbbhDaRU= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/113907] [11/12/13/14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41 Date: Mon, 11 Mar 2024 11:21:23 +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: jakub at gcc dot gnu.org 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 #54 from Jakub Jelinek --- Slightly adjusted #c41 testcase, which indeed still fails with my patch at = -O2: int d[100], c; static __attribute__((noinline)) int foo (int x, unsigned int y) { if (y > 30) ++c; return x + y; } static int bar (unsigned int x) { if (x > 100) __builtin_unreachable (); if (__builtin_expect (d[x] !=3D 0, 1)) return d[x]; for (int j =3D 0; j < 100; j++) d[x] +=3D foo (d[j], x & 1 ? x + 17 : x + 16); return d[x]; } static int baz (unsigned int x) { if (x > 10) __builtin_unreachable (); if (__builtin_expect (d[x] !=3D 0, 1)) return d[x]; for (int j =3D 0; j < 100; j++) d[x] +=3D foo (d[j], x & 1 ? x + 17 : x + 16); return d[x]; } int main () { int r =3D baz (1) + baz (2) + baz (3) + bar (4) + bar (30); if (c !=3D 100) __builtin_abort (); return r; } I still think we want both my patch and some fix for the jump functions, not just the latter. Anyway, can we in the spot my patch changed just walk all source->node->cal= lees cgraph_edges, for each of them find the corresponding cgraph_edge in the al= ias and for each walk all the jump_functions recorded and union their m_vr? Or is that something that can't be done in LTO for some reason?=