From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B30003857705; Wed, 4 Oct 2023 09:37:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B30003857705 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696412239; bh=3k+4Njs4/H6gVslw08ebto4lRzGU6M4F7KSMRziE8h0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gO8ModxPAaUlXv9zUEF9EOmsn/dWBxQQKAJ1bPcDk0lQjpYIbCb50HtYMug1McAME nuhsJnknE8s2d5+VaimbOh6o7yctMDygzOQHJ/JL+3Dxs5/bmFG+JH8a5KkabANdUz MjkMKri1iCw7xWRyxY0GNPe8DKHJKtesuAECcUz8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111655] [11/12/13/14 Regression] wrong code generated for __builtin_signbit and 0./0. on x86-64 -O2 Date: Wed, 04 Oct 2023 09:37:17 +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.2.1 X-Bugzilla-Keywords: 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: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_known_to_work target_milestone 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=3D111655 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |4.8.5 Target Milestone|--- |11.5 --- Comment #10 from Richard Biener --- And this conservatively has to apply to all FP divisions where we might inf= er "nonnegative" unless we can also infer !zerop? On the side of replacing all uses I'd error on simply not folding. Note 6.5.5/6 says "In both operations, if the value of the second operand is zero, the behavior is undefined." only remotely implying this doesn't apply to non-integer types (remotely by including modulo behavior in this sentence). Possibly in some other place the C standard makes FP division by zero subje= ct to other rules.=