From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5D86E3858C3A; Sat, 5 Feb 2022 09:54:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D86E3858C3A From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/104389] [10/11/12 Regression] HUGE_VAL * 0.0 is no longer a NaN Date: Sat, 05 Feb 2022 09:54:17 +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: 12.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.4 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Feb 2022 09:54:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104389 --- Comment #7 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:b3763384a1f696260f3ee7bda8c0e7e4ad732ad9 commit r12-7072-gb3763384a1f696260f3ee7bda8c0e7e4ad732ad9 Author: Jakub Jelinek Date: Sat Feb 5 10:52:19 2022 +0100 match.pd: Fix x * 0.0 -> 0.0 folding [PR104389] The recent PR95115 change to punt in const_binop on folding operation with non-NaN operands into NaN if flag_trapping_math broke the following testcase, because the x * 0.0 simplification punts just if x maybe a NaN (because NaN * 0.0 is NaN not 0.0) or if one of the opera= nds could be negative zero. But Inf * 0.0 or -Inf * 0.0 is also NaN, not 0.0, so when NaNs are honored we need to punt for possible infinities t= oo. 2022-02-05 Jakub Jelinek PR tree-optimization/104389 * match.pd (x * 0 -> 0): Punt if x maybe infinite and NaNs are honored. * gcc.dg/pr104389.c: New test.=