From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 63A4B3858C52; Wed, 21 Sep 2022 09:14:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63A4B3858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663751659; bh=YSea789MqgjSBRJzcqH7fI7VwZqsEfmOrWlRhY6cplM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=h5C/vXdF4HTS61tNmOqrCyEkqQzIWmVyUypCP7MPVAZfYrjWv+JDtDZqfGu01Lowu O5aaI/CmndGCh9j+ZhIqhFEURa2uLRA0JdwIkPmpUZFzPIrQxuBl/M7bLpebtd82Ey zM5lab9/rzTnNFZDCg3DzfQc/T6ibDskaHElz69s= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106992] [12/13 Regression] aarch64: Unexpected maybe-uninitialized warning when compiling fdlibm Date: Wed, 21 Sep 2022 09:14: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: 13.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_gcctarget everconfirmed cf_reconfirmed_on bug_status target_milestone blocked priority short_desc 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=3D106992 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Target|aarch64 |aarch64, x86_64-*-* Ever confirmed|0 |1 Last reconfirmed| |2022-09-21 Status|UNCONFIRMED |NEW Target Milestone|--- |12.3 Blocks| |24639 Priority|P3 |P2 Summary|aarch64: Unexpected |[12/13 Regression] aarch64: |maybe-uninitialized warning |Unexpected |when compiling fdlibm |maybe-uninitialized warning | |when compiling fdlibm CC| |rguenth at gcc dot gnu.org --- Comment #1 from Richard Biener --- Confirmed without -fno-strict-aliasing and with -fno-tree-vectorize -fno-strict-aliasing on x86_64. It's a bit odd - I traced walk_aliased_vdefs and indeed it didn't come along a definition of fq. We diagnose a PRE hoisted fq[0] but even with -fno-tree-pre -fno-code-hoisting we diagnose that. -fno-thread-jumps avoids the diagnostic. The reference we diagnose is introduced by thread2: k_rem_pio2.c.195t.thread2: _508 =3D fq[0]; This case is jump thread: (80, 136) incoming edge; (88, 90) normal (90, 94) nocopy; [local count: 437174]: : if (jz_117 >=3D 0) goto ; [89.00%] else goto ; [11.00%] [local count: 437174]: # fw_363 =3D PHI if (ih_111 !=3D 0) goto ; [50.00%] else goto ; [50.00%] [local count: 218587]: iftmp.2_253 =3D -fw_363; *y_237(D) =3D iftmp.2_253; _85 =3D fq[0]; fw_255 =3D _85 - fw_363; if (jz_117 > 0) goto ; [89.00%] else goto ; [11.00%] so it might be that we somehow thread a jz < 0 case (which would skip the init loop) but I still can't see how ... I've used -Wall -O2 -std=3Dc11 k_rem_pio2.c -fno-tree-vectorize -fno-strict-aliasing -fno-code-hoisting -fno-tree-pre for the above. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D24639 [Bug 24639] [meta-bug] bug to track all Wuninitialized issues=