From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D9050385B530; Sat, 25 Feb 2023 10:24:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9050385B530 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677320675; bh=mUB9iKUxt5epDwF2NsmHRpcTx3HgjJnwhlmZPtC+g0s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pCWNApeYJd4MT1mYRa+9OPOsbuvvOOMboeeIhFPeYg28iKSeYS8GwH97zbM0Ei7Bi 2U/yMlgYtX4Fo4I2TdjD1F4ReWwKatX1GteyMdhtF6vNteqZccE6XMc1/1pt0b8vrD X4WiO1rHhh447CIVyECd74b5KRshuLwhXVR7kANc= From: "amonakov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108922] fmod() 13x slowdown in gcc4.9 dropping "fprem" and calling fmod() Date: Sat, 25 Feb 2023 10:24:35 +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: 12.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: amonakov at gcc dot gnu.org X-Bugzilla-Status: WAITING 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: 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=3D108922 --- Comment #4 from Alexander Monakov --- Plus, Glibc does use fprem/fprem1 for fmodl/remainderl on x86_64, as well as for {fmod,remainder,remquo}{,f,l} on i386 without any branches for corner cases. So in practice CPUs apparently implement the expected behavior even though the manual doesn't promise so. The ieee_2.f90 testcase attempts to change rounding mode. It 2014 it probab= ly just was "miscompiled".=