From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 327923857704; Wed, 23 Aug 2023 23:16:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 327923857704 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692832593; bh=cavUbgfd2HFJaFVh5pStcimiCVdgKc7I+YoqISQLDFI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sjPhnU4w19aegFC/opD/NE0J9lr9Nu8hplTGE17lTCUn8NP3c2ZfS4EeGbthTlder pz3vPFHofagnKdoIyK47RHe2OVOKG/qj61dQgtHXQ0LPIzZ7ox3AyIIIwu2TTbS2wq dow5QND0I71qSu+o9ZgB+Kcm8uelt/6vsmSfQkyo= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111110] (A CMP B) != 0 and (A CMP B) == true patterns produce an extra (A CMP B) rather than reusing it Date: Wed, 23 Aug 2023 23:16:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pinskia at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution 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=3D111110 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |WONTFIX --- Comment #2 from Andrew Pinski --- So this won't work even though it is the right thing to do because when we = are folding `if (a !=3D 1)` and a is defined by a comparison, we want to get ba= ck the comparison. Now you could say this is problem in how we fold GIMPLE_COND but it is what= it is right now.=