From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3D8FE3858C78; Wed, 22 May 2024 08:26:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D8FE3858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716366385; bh=gepl1s5K2lmiRdod1d/q7atW8hB6ktX5FZX/NM9u7yI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dIgqBN1YVFhHoThUFUWZejfgoGISmhenRALC5EnzmeBT2e+1tBqq7F0MJkqQDQWQs 4QrizPF22nyaZ+j3BTdBsZquzDlSS8N70nEJk9riYEdscqkx/TvvD5fdfkNoUNHdDd /D2wFWbuw/0+tputfdAcXETT2BbU8UWfpUK58YoE= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/115161] [15 Regression] highway-1.0.7 miscompilation of some SSE2 intrinsics Date: Wed, 22 May 2024 08:26:22 +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: 15.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 15.0 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=3D115161 --- Comment #19 from Jakub Jelinek --- (In reply to Alexander Monakov from comment #18) > No, allowing value-changing transformations under -ftrapping-math is real= ly > not appropriate. Invoking the intrinsic on a large floating-point value is > not UB. If we guarantee that we never constant fold FIX/UNSIGNED_FIX with -ftrapping-math (we shouldn't, as the exceptions should be raised), then us= ing FIX/UNSIGNED_FIX is ok in flag_trapping_math guarded patterns even if the intrinsics have some specif= ic value they want in those cases, because they will never be folded. While for !flag_trapping_math, we should use UNSPEC because FIX/UNSIGNED_FIX can be folded and would be folded to whatever the generic code decides, whi= ch might disagree to what the intrinsics need.=