From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AA0C538708C7; Fri, 24 Mar 2023 11:20:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA0C538708C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679656844; bh=nF/QnDj7acYTT27ds9bJ3uZnpuN5ET83zvrqJLSr0Uk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GOXUaQ6VUAOIeIvrSKfYn9DbLgfDP1LOWJ7TYmbQgNT+vLH5mcHFYZGLgEwuXJpsA 9iKK75MaD19O8lKYWkboF8C4deViWkpbA+j5MtTDh8lmCxXalFdZZKw/0aTsG9JFma OSSv3emLKEILMsSUyZr6TVKRkpLmWg469s6TC4kw= From: "andysem at mail dot ru" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/98612] _mm_comieq_sd has wrong semantics Date: Fri, 24 Mar 2023 11:20:43 +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: 10.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: andysem at mail dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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=3D98612 andysem at mail dot ru changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andysem at mail dot ru --- Comment #9 from andysem at mail dot ru --- Some relevant discussion here: https://stackoverflow.com/questions/75818896/mm-comieq-ss-difference-betwee= n-clang-and-gcc Indeed, the description for _mm_comieq_ss in the Intrinsics Guide 3.6.5 as = of 2022-01-24 takes NaNs into account: https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#te= xt=3Dcomiss&ig_expand=3D1424 I think, the point that the intrinsic should correspond to the naked instruction is not correct in this case. The intrinsic corresponds to the s= ame instruction either way, the question is only which flags are considered the result of the intrinsic. And it seems that the intended behavior (as indica= ted by the updated docs, icc and clang) is to check ZF & PF, not just ZF as gcc= is currently doing.=