From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 272CC385BF83; Tue, 14 Apr 2020 18:51:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 272CC385BF83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586890305; bh=D8KQnqtc6MXbSHeRW2T+g15NbXD7KP+SnlTJyQZI/+M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FboHnuQB/6G6YWtcXM0GMLLGd0dGy8TM9HRBJpPcMGBqyCUGVRk/5boLA7riDS9LM e5D7Aplv6xjcoSMRoWnFvh1r1lNJnIRhqZnalsgET+lKuOuLVGAosRWf++7tI6nKSq Q+7UnlLlyxQFlSe0UnJC3KCCG8AHwSirVnR7q2d4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94587] Intrinsics optimization bug with -O2 -march=skylake-avx512 Date: Tue, 14 Apr 2020 18:51:45 +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: 9.3.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX 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: resolution bug_status 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2020 18:51:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94587 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|REOPENED |RESOLVED --- Comment #4 from Andrew Pinski --- (In reply to Patrick J. LoPresti from comment #3) > That works; thank you. However... >=20 > I realize there is no formal spec for intrinsics. But when I use them, I > expect deterministic behavior by default. This has been true on every > compiler with every set of optimization and architecture flags I have ever > used (GCC before AVX, many versions of Clang, many versions of the Intel > compiler). >=20 > Also, the "-DHEISENBUG" example shows that simply adding a side-effect-fr= ee > assert() changes the behavior. This seems... unfriendly... as a default. Note this is true even without using intrinsics really. You can get the sa= me behavior you are seeing with using standard C code.=20=20 >=20 > Wouldn't fp-contract be more appropriate as part of "-ffast-math"? No. This has been discussed many times and decided no.=20=20 >=20 > To my knowledge, no other compiler behaves this way. Are there any other > options I need to ensure deterministic behavior for SSE intrinsics on GCC? > Will there be more in the future? I do apologize if I missed the answer in > the 1000-page GCC manual. https://gcc.gnu.org/onlinedocs/gcc-9.3.0/gcc/Floating-point-implementation.= html#Floating-point-implementation=