From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6BB3A386EC0C; Thu, 10 Nov 2022 23:42:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BB3A386EC0C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668123759; bh=a5CChhjKEmYQ5jV5yysP+sOOhxvYTA54X8HJEjWhnW4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XC48IqYcv2Nzk6ZYo7NYdJxUwvgNnE4CmPf0DZ7u+aK1WJ1WjlKwoLjiV26urAGBz eINoIh02cUlJW0uE+bGsrtw6zrWxq+7+6LoZgxoVVYLuVpmsSL7TZbg7rhfSKwI0wv 8Vf6FLgAa8QouyuQ2yGLYbg0+jM7G5M8obACawOI= From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105480] Vectorized `isnan` appears to trigger FPE on ppc64le Date: Thu, 10 Nov 2022 23:42:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: linkw at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D105480 --- Comment #12 from joseph at codesourcery dot com --- __builtin_isnan must not raise "invalid" for signaling NaN arguments. __builtin_isunordered (i.e. UNORDERED / UNORDERED_EXPR; standard macro=20 isunordered) must raise "invalid" for signaling NaN arguments. The -ftrapping-math option (which is on by default) means code=20 transformations that either add or remove exceptions should be avoided=20 (though this isn't implemented very consistently, especially as regards=20 transformations that remove exceptions). Thus, transforming in either direction between __builtin_isnan and=20 UNORDERED_EXPR is undesirable given -ftrapping-math -fsignaling-nans.=20=20 Given -fno-trapping-math or (default) -fno-signaling-nans, the=20 transformation is OK.=