From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E1D993858404; Tue, 10 Jan 2023 11:09:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1D993858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673348940; bh=DxUcdDWdJ2pejCZ8nnIePjJUJczgRtY4vhfH738xxo0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vZ5AOR/Eubqg4+gmtFqTW71KmE45hvJzvaVNeX6RuUEXmzummgHid5JW6rsI/yx4S tO7AQCIrv2NbEUTSLAI9w9W7zsBGOIWTs1JkGx6PbS6k+1yUGa1ApR2VemiWQQCJlH 6WyWCeuYvYznTZxxNwqPkbCbf6CK/IW9+AWjJL70= From: "jakub 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: Tue, 10 Jan 2023 11:09:00 +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: jakub 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: 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 --- Comment #18 from Jakub Jelinek --- See #c10, I think even with comparisons we need to be careful. One thing is whether we can prove one of the branches will be unreachable, we can do that and replace that branch with __builtin_unreachable, but if trapping math is= on, if a comparison is possibly trapping (operands could be NAN as checked by frange) or if it is the last use of some SSA_NAME that needs to be kept live because its computation is possibly trapping, I think we need to preserve t= he comparison. One question is if the default -ftrapping-math should cover all exceptions = or just the some subset, invalid/overflow are the worst ones, then underflow a= nd least importance is inexact IMHO, pretty much anything can be inexact...=