From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 43A3F3858D35; Fri, 9 Jun 2023 22:24:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 43A3F3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686349488; bh=H8k9EC3lJP8ZOsh5hy5KjDijozAjvGW7oguUSgGd7p4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CD/cF6PDHBIugoaE/lriHazaX2UtxEedst4V9gsaJabeOL0uIhrFwxmLEQN2LVi/b hA12RnTmKtL8MY24xr7cheOJb/kBZOp1xRWdVrwFoQrllAO5p5tPNz5T5qGFWrtO0x 5NP9zewEDDEeKp6P9uz0NgIbqZCQrZubjx/nCRu4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/88575] gcc got confused by different comparison operators Date: Fri, 09 Jun 2023 22:24:48 +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: 9.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 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=3D88575 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2019-01-02 00:00:00 |2023-6-9 --- Comment #5 from Andrew Pinski --- So VRP handles floating point now but it still does not optimize it: Folding statement: if (a_2(D) <=3D b_3(D)) Registering value_relation (a_2(D) <=3D b_3(D)) on (2->3) Visiting conditional with predicate: if (a_2(D) <=3D b_3(D)) With known ranges a_2(D): [frange] double VARYING b_3(D): [frange] double VARYING Predicate evaluates to: DON'T KNOW Not folded Folding statement: _4 =3D MIN_EXPR ; Not folded While the int does this: Folding statement: _4 =3D MIN_EXPR ; folding with relation a_2(D) <=3D b_3(D) Global Exported: _4 =3D [irange] int [-INF, 2147483646] Not folded Which is a regression from GCC 12 ....=