From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8325D3858D28; Mon, 6 Nov 2023 06:53:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8325D3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699253605; bh=1xErrJCjHf3AYU+Y3UpiD02v9R7IP5nbl1QNM0z6iTI=; h=From:To:Subject:Date:From; b=KYpY5idN2BwUeDJFgYZ53HrLGv+tATa7lxZapjUC7Yfv5hJnZrZLunQjM5JqzMzkD I/UdQY3QQzh0+DTvH9ZHeEtFhRlDN+KSZZicZCuJdQA7po9FutMGiKktsO3QRtOeLK Fv/hB5a9rLzGWB/hO9tJ1ZH2c9PiH4UDV7mCjEm8= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112402] New: [11/12/13/14 Regression] Path splitting causes if-conversion miss Date: Mon, 06 Nov 2023 06:53:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter blocked target_milestone Message-ID: 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=3D112402 Bug ID: 112402 Summary: [11/12/13/14 Regression] Path splitting causes if-conversion miss Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Blocks: 94274 Target Milestone: --- Similar to PR 68541 except instead of having a diamond, we just have a triangle. Testcase: ``` int foo(signed char *p, int n) { int s =3D 0; int i; for (i =3D 0; i < n; i++) { int t; if (p[i] >=3D 0) t=3D1; else t=3D-1; s+=3Dt; } return s; } ``` I noticed this while working on fixing PR 94274. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94274 [Bug 94274] fold phi whose incoming args are defined from binary operations=