From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6D6E73858C2D; Mon, 27 Nov 2023 23:21:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D6E73858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701127269; bh=kMzNmrTJtYGLUHiexsLAORxba7rkCZzvJ9XfD+pAwk0=; h=From:To:Subject:Date:From; b=LRW7GL5hrZhW6PhsKr+k7+fVOkaoCm5qXEdaG9b7rT03kDPvV+mhJf4yixl6u1YlU 9rTCaU7HpBtJW8DXDCQhFT8oCPcev0/m6Cy5VFdHOrVRgnUcpGrMXA7LuM3jRCMiUV V1T/vUn5m5AU8MUv3rP2rHwQgNa9PLXnjwDmW2tE= From: "kristerw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112738] New: forwprop4 introduces invalid wide signed Boolean values Date: Mon, 27 Nov 2023 23:21:09 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: kristerw 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 bug_severity priority component assigned_to reporter 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=3D112738 Bug ID: 112738 Summary: forwprop4 introduces invalid wide signed Boolean values Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: kristerw at gcc dot gnu.org Target Milestone: --- The forwprop4 pass introduces an invalid wide Boolean when compiling the following function with -O3 for X86_64: int *a, b, c, d; void foo (void) { for (; d <=3D 0; d++) b &=3D ((a || d) ^ c) =3D=3D 1; } What is happening is that forwprop4 changes the IR _38 =3D (signed int) _16; _59 =3D -_38; _65 =3D () _59; to the incorrect _55 =3D () _16; _65 =3D -_55;=