From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B56903858D39; Fri, 2 Dec 2022 12:48:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B56903858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669985296; bh=sc6ApeqinmZhrHiXkKk1vdcjuqZFant1R6F1DZJeB1c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Vy6anLXLfGrix1qkjs/ChdLka1HMoBDlRH9YLnukBi2xr25y+S995RbuFNLYna7Dk fwkhDx1izRXZM6ECksSlveJ6qaC0jmM7ZfO682erAmfeoodvhHoKeSwd4YJQDwfX5t wro5fk9ceR0jWAZJO24dFCNtsd1HnhfWP7fsTJgY= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106805] [13 Regression] Undue optimisation of floating-point comparisons Date: Fri, 02 Dec 2022 12:48:15 +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.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc attachments.created 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=3D106805 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek --- Created attachment 54004 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54004&action=3Dedit gcc13-pr106805.patch Untested patch. I believe fold_relational_const does it right, in the matc= h.pd case we are doing it just for simple_comparison, so a subset of those, so only =3D=3D/!=3D are quiet from those. Unfortunately, the patch isn't enough. On 12 branch it is enough until expansion but during expansion we just drop the comparisons for some reason, and on 13 branch it is worse, frange kicks in and we have the PR107608 problems.=