From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0C3BF385842B; Mon, 28 Nov 2022 10:06:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C3BF385842B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669629966; bh=9UMcJLAy/fIUN7fD8koZqqHgd367a3m8nb+2hrTTkUs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LjDOLDYIzRJK7RpCxWUBCG8GHg7PTG2jwG01wq3jtqasiRg5dqzq9QFck/dO6EBzX X7qG6h/JEht38bAGyLACr8Bmv+jzG6OmuaTF5GbmtyLoAIA40HtioA+foX7pmh6Kii 8ow6LKyp7gGkoj3NiOu1zC0iueOiAHBpVgr1R1CQ= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c Date: Mon, 28 Nov 2022 10:06:04 +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: 13.0 X-Bugzilla-Keywords: missed-optimization, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords 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=3D107608 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization --- Comment #6 from Richard Biener --- (In reply to Jakub Jelinek from comment #0) > ... but then > comes dom2 and happily replaces > _1 =3D 3.4028234663852885981170418348451692544e+38 * 2.0e+0; > return _1; > with > _1 =3D 3.4028234663852885981170418348451692544e+38 * 2.0e+0; > return Inf; > (I think this is still correct) Note this is also a pessimization code-generation wise since if we preserve the multiplication the result is readily available in a register but as optimized we have another constant pool entry and load. So we might want to consider not propagating constants generated by operati= ons we cannot eliminate. If the only consumer is a compare-and-branch we can of course still end up with a seemingly dead stmt, so this would be only for the missed optimization.=