From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E94F73858D3C; Tue, 28 Feb 2023 16:51:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E94F73858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677603078; bh=76gVUBSnggM3l1wBG60u0lQMy/O9hsBHywKaQj5eyko=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JugXx1j9EjssIWMMvdmF/KxkU+NRdUMLOe2kO7x+zRrjcg/xej+0baqhw43J/jj7E fUYxc8tx360jB4q7mtqlnUCqs80jJyJRF1J9hTJo31UENEiS7Vb1UXj37rF7cL8AI4 QSIdZIcQhEzyB41kP/OT97Wm36hk1GE8+UMpbdng= From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108922] fmod() 13x slowdown in gcc4.9 dropping "fprem" and calling fmod() Date: Tue, 28 Feb 2023 16:51:18 +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: hjl.tools at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ubizjak at gmail dot com X-Bugzilla-Target-Milestone: 13.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=3D108922 --- Comment #33 from H.J. Lu --- (In reply to Uro=C5=A1 Bizjak from comment #20) > (In reply to Jakub Jelinek from comment #16) >=20 > > More questionable is the #Z case, where Table 8-11 just talks about > > Divide or reverse divide operation Returns an =E2=88=9E signed with th= e exclusive > > OR of the > > with a 0 divisor. sign of the two operands to the > > destination operand. > > but FPREM does division too, so I hope it is covered too (but not listed > > explicitly). >=20 > FYI, the table 3-30 (and 3-31) is wrong. Executing fprem when st(0) =3D= =3D 1.0 > and st(1) =3D=3D 0.0 results in IA exception, not Z exception. Thanks for bringing it up. It will be fixed in the next revision for Intel SDM.=