From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E65DE3858C2D; Sat, 13 May 2023 18:45:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E65DE3858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684003559; bh=0vDTuI+BlopdsrbaHiPVd71yXDhByIFOs57/PdsJADA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QV/cFref+rq+iYC9+LDMvWumS3rrNHJdvn6jTs6wxvT90UFm1ixKPXrAmnRgQkdeq Dn2h5mSE23LVWNpkBwfDPybvhJIITWWfzos0oLPrXmFKg7VXZFXs4JMRfUwjvMrPcu XEHTU/GkvVOn1SP3U/J0jXUnNhy3+DxVARaB9SGQ= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/109845] Addition overflow/carry flag unnecessarily put in a temporary register Date: Sat, 13 May 2023 18:45:59 +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: 13.1.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW 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: cf_reconfirmed_on bug_status bug_severity component keywords everconfirmed 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=3D109845 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-05-13 Status|UNCONFIRMED |NEW Severity|normal |enhancement Component|rtl-optimization |middle-end Keywords| |missed-optimization Ever confirmed|0 |1 --- Comment #2 from Andrew Pinski --- So the difference between good1 and bad1 at the gimple level is the order of operands of the bit_ior: good1: ov_8 =3D _13 !=3D 0; _9 =3D x_2(D) !=3D 0; _10 =3D ov_8 | _9; if (_10 !=3D 0) bad1: ov_7 =3D _13 !=3D 0; _1 =3D x_8(D) !=3D 0; _2 =3D _1 | ov_7; if (_2 !=3D 0)=