From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DFA353858409; Tue, 28 Sep 2021 11:03:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFA353858409 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/102498] [9/10/11/12 Regression] Long double constant and non-default rounding mode on x86 Date: Tue, 28 Sep 2021 11:03:27 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 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 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, 28 Sep 2021 11:03:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102498 --- Comment #8 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:3b7041e8345c2f1030e58620f28e22d64b2c196b commit r12-3920-g3b7041e8345c2f1030e58620f28e22d64b2c196b Author: Jakub Jelinek Date: Tue Sep 28 13:02:51 2021 +0200 i386: Don't emit fldpi etc. if -frounding-math [PR102498] i387 has instructions to store some transcedental numbers into the top = of stack. The problem is that what exact bit in the last place one gets f= or those depends on the current rounding mode, the CPU knows the number wi= th slightly higher precision. The compiler assumes rounding to nearest wh= en comparing them against constants in the IL, but at runtime the rounding can be different and so some of these depending on rounding mode and the constant could be 1 ulp higher or smaller than expected. We only support changing the rounding mode at runtime if the non-default -frounding-mode option is used, so the following patch just disables using those constants if that flag is on. 2021-09-28 Jakub Jelinek PR target/102498 * config/i386/i386.c (standard_80387_constant_p): Don't recogni= ze special 80387 instruction XFmode constants if flag_rounding_mat= h. * gcc.target/i386/pr102498.c: New test.=