From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 78B4938582B9; Tue, 13 Feb 2024 15:58:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78B4938582B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707839920; bh=QiEcbDZM3EKmYV8DgXV3MiAPIJmifs496kqGGQKFk30=; h=From:To:Subject:Date:In-Reply-To:References:From; b=D/kG0UCXomnQIw9ofHhS4CUntQHV7WcVarr8yCtWWafiUgVkPLmZ7Vcj9XMzpHRCO YP9cMCZI92PH/KXBZX+4UsO1hJaMkiJzWP6EWwklce0rgq3OrBnOjRp/5ieAItVWv4 +1PxNJ53vcfnNh1wxrOjEHEeApjzWfS2+FyQlz6M= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41 Date: Tue, 13 Feb 2024 15:58:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end 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: UNCONFIRMED 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: cc 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 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jamborm at gcc dot gnu.org, | |rguenth at gcc dot gnu.org --- Comment #20 from Jakub Jelinek --- Ah, I think it is IPA-ICF. What happens is that fnsplit splits the uprv_copyArray{16,32,64} functions, where the inline part does what is actually different among the functions, i.e. the tests which among other do the early out for length<0 || (length&1)!=3D0 or length<0 || (length&3)!=3D0 or length<0 || (length&7)!=3D0 among other things, and then the *.part.0 parts which are exactly the same = for the 3 functions IL wise, except for the unfortunately differences in the ranges. So, essentially just [local count: 132713219]: _2 =3D length_1(D) !=3D 0; _5 =3D inData_3(D) !=3D outData_4(D); _6 =3D _2 & _5; if (_6 !=3D 0) goto ; [33.00%] else goto ; [67.00%] [local count: 43795362]: # RANGE [irange] unsigned int [N, 2147483647] MASK 0x7ffffffe VALUE 0x0 length.43_7 =3D (unsigned int) length_1(D); # USE =3D anything # CLB =3D anything memcpy (outData_4(D), inData_3(D), length.43_7); [local count: 132713219]: [local count: 132713219]: # RANGE [irange] int [0, 0][N, +INF] MASK 0x7fffffff VALUE 0x0 # _8 =3D PHI return _8; where N is 2, 4 or 8. Now IPA-ICF comes, doesn't care about ranges, merges all 3 into one and pic= ks there the most unfortunate case, the case from the copyData64 part with N 8. Later on we inline this back into the functions, the function splitting was useless. So, the question is what to do in IPA-ICF. Should we punt on range differences, reset all ranges or try to merge the ranges from all the funct= ions merged together? I think the last would be best.=