From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6C26E38F83C5; Thu, 30 Mar 2023 10:40:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C26E38F83C5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680172825; bh=9tm0R0P5zWOgqNeN7nIhlSltGHwjFMoMN3WQxm1E2Bw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LozDbuYm9mD4LXraO7y+piuGc9aJkuHWTfanMW5ti/tw+aS5OVFbUIaHAIrlFkbxE LAwpzmXBgKVc+1QThIUaoMj9nnWdWxh5MzmEZAMFlmw2df9i9ksTqV5Ondv0DGzcNQ Z53icEiZdeg73BnuWYsz55CNDD0ae/7HUaIOQgc8= From: "xry111 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103559] Can't optimize away < 0 check on sqrt Date: Thu, 30 Mar 2023 10:40:23 +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: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: xry111 at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D103559 Xi Ruoyao changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org --- Comment #8 from Xi Ruoyao --- (In reply to Jakub Jelinek from comment #7) > The HW sqrt certainly handles NAN input by returning NAN output, the > question is if it is required to set some errno in that case as well or n= ot. > One would need to check what different libcs do in that case. Glibc sets EDOM: https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dmath/w_sqrt_template= .c=