From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 189E13858C53; Thu, 9 Nov 2023 08:42:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 189E13858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699519374; bh=8sBAYEKXRPfY8cmaOhKeSwtKa/QzjW6Ny+aWtW0VWws=; h=From:To:Subject:Date:In-Reply-To:References:From; b=y0fvTdMJCQbSaj/7YeUSf8AtbEFb1h3LmA4o6VMTdY5ogUYx6cFhcSU8n60QTzW8s JGEOodoSUyXxt6NMWbn66EGpXxWrr2+XnXWk5HDcDgLzc8/5R2i+2ShthdFIULDtID pYlEWLHZIehFBgkC49rUOVE5AJe7YJBIly2JHrCY= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBtaWRkbGUtZW5kLzExMjQ0NF0gWzE0IHJlZ3Jlc3Npb25d?= =?UTF-8?B?IElDRSB3aGVuIGJ1bGlkaW5nIGxpYnFtaSB3aXRoIC1PMyAtZnRyaXZpYWwt?= =?UTF-8?B?YXV0by12YXItaW5pdD16ZXJvIChpbnRlcm5hbCBjb21waWxlciBlcnJvcjog?= =?UTF-8?B?dHJlZSBjaGVjazogZXhwZWN0ZWQgY2xhc3Mg4oCYdHlwZeKAmSwgaGF2ZSA=?= =?UTF-8?B?4oCYZXhjZXB0aW9uYWzigJkgKGVycm9yX21hcmspIGluIHVzZWxlc3NfdHlw?= =?UTF-8?B?ZV9jb252ZXJzaW9uX3AsIGF0IGdpbXBsZS1leHByLmNjOjg1KSBzaW5jZSBy?= =?UTF-8?B?MTQtNDQwNS1nYjU4M2EyOTQwYWY5MGQ=?= Date: Thu, 09 Nov 2023 08:42:53 +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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth 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=3D112444 --- Comment #8 from Richard Biener --- OK, so the reason is that we value-number tmp_46 in [local count: 482002707]: if (0 !=3D 0) goto ; [33.00%] else goto ; [67.00%] [local count: 322941815]: tmp_5 =3D .DEFERRED_INIT (1, 2, &"tmp"[0]); ... goto ; [local count: 159060893]: ... tmp_2 =3D .DEFERRED_INIT (1, 2, &"tmp"[0]); ... tmp_46 =3D PHI to tmp_2 because we use ssa_undefined_value_p () to check whether we are dealing with an undefined value. And that returns true for tmp_5. This makes us pick tmp_2 which we treat as VARYING since we didn't visit it and we don't trust the not-executable state of its incoming edge (a missed optimization, guess I can look at that as well). tmp_2 is also considered undefined. We then have /* If we saw only undefined values and VN_TOP use one of the undefined values. */ else if (sameval =3D=3D VN_TOP) result =3D seen_undef ? seen_undef : sameval; and "one of" puts us in an unlucky situation here. I do have a sensible fix around this I think.=