From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 170703857728; Wed, 19 Jul 2023 16:16:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 170703857728 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689783390; bh=6+okMRM7b+OjG7gOQxnKgS/K7PyLa05zUas7zcWDLTI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=R2O4AACB8huasAgnrDj1J90DEVua4ORxUTC3nH4XYn9/4+2fqcCScp6oayzDQT9bl FAl+z0AwB/NoSR9pjCLxRLw/aTXMzagHcjW77NcLoiN7vg4hp0IvcLHAGn5S7mIQnv FpI9fyPAzwV4RXe/ZFLYJ/eyFdjHryZzPKI0gaeQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110726] [14 Regression] wrong code on llvm-16 around 'a |= a == 0' Date: Wed, 19 Jul 2023 16:16:29 +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: patch, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia 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=3D110726 --- Comment #11 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:bf20b770d9aabb15faf2644b5e3106249cb175f3 commit r14-2648-gbf20b770d9aabb15faf2644b5e3106249cb175f3 Author: Andrew Pinski Date: Tue Jul 18 21:11:46 2023 +0000 Fix PR110726: a | (a =3D=3D b) can sometimes produce wrong code So I had missed/forgot that EQ_EXPR could have an non boolean type for generic when I implemented r14-2556-g0407ae8a7732d9. This patch adds check for one bit precision intergal type which fixes the problem. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/110726 gcc/ChangeLog: * match.pd ((a|b)&(a=3D=3Db),a|(a=3D=3Db),(a&b)|(a=3D=3Db)): Add checks to make sure the type was one bit precision intergal type. gcc/testsuite/ChangeLog: * gcc.c-torture/execute/bitops-1.c: New test.=