From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 891123858D20; Mon, 27 Feb 2023 09:33:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 891123858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677490428; bh=m7P1+VOi6wTdtFAqZR+H0lJYuvqg2L2a6URfEZ1bcm0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=t3SwioMSEOm4ZL0jxoVNY7y0G+5cTLz7n8iXoFe25+pWpzV+5InYxid7W1pSM3c0I NkSjUhA5dvMHZ0Y2MUyAlIVpW1QH5wbEzK4ulXRTdalP8Np165oDB0BfhnV42Yl1pr Stj16Wmte8eeXXJWitcTOZTriHuX2wzaBOqdQxkQ= From: "ubizjak 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: Mon, 27 Feb 2023 09:33:48 +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: ubizjak at gmail dot com 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 #20 from Uro=C5=A1 Bizjak --- (In reply to Jakub Jelinek from comment #16) > 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 the = 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). 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.=