From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F20FA3849AC5; Fri, 19 Apr 2024 11:38:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F20FA3849AC5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713526732; bh=ZblRW+8q2/aFodV4Io5H2F+ryDig6/9Yx2A3ab1zeH8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Q7xb+hMYFNrVX4qkPhxT8blQj1vK9QhZyTbnTKNqSQ9nHsbUcyTHDUe1ivW9SS6Se VyLVWx9b2nNpiFHPMwWZaecKU4gjQSPGej9SG2BmgLGladd9ZlAM74He5l+0xF7opB OO7gzyvYDkiy/ejxcRTxaOB5w9HFarpGuk8Xal4E= From: "bruno at clisp dot 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: Fri, 19 Apr 2024 11:38:48 +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: bruno at clisp dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 Bruno Haible changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bruno at clisp dot org --- Comment #16 from Bruno Haible --- (In reply to Paul Eggert from comment #5) > Although it is indeed unspecified whether 0.0/0.0 yields -NaN or +NaN, it= is > well understood that negating a floating point value flips its sign bit. While I agree that this is generally true, it's not the case on mips with c= lang as compiler. Namely, this compiler generates 'neg.d' instructions for the unary minus of= a 'double' value, and this instruction may be a no-op on NaN values, dependin= g on the CPU's control registers. For details, see the "MIPS=C2=AE Architecture = for Progreammers, Volume II-A: The MIPS=C2=AE Instruction Set Manual", page 307= (317). Whereas gcc generates an integer XOR instruction (at least in my test cases= ), so is fine.=