From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 98EE13858C00; Mon, 24 Jul 2023 07:12:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98EE13858C00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690182733; bh=VMWruuwCSL0mTjq/dIXojdJfciWdeiPcD3pam/fMjIc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xbjNNZqeBDuK9pPwpn7uowOX7O6oX6Siw0U8AMZo/98818wEL4WU6PC6j259/tfaG wMb+GtWaqN2TCfmI6qOfetS0oFvf05HWKp6CB/19gxBYh2AhjFSq4hzaq7XetDZBia 9/57VSEvb9RHBPDQjsleTotNg51fzckqXSHCBls4= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110755] [13/14 Regression] Wrong optimization of fabs on ppc64el at -O1 Date: Mon, 24 Jul 2023 07:12:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.2 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=3D110755 --- Comment #8 from Jakub Jelinek --- Actually looking at IEEE754, the fix should be limited to +- operations, not +-*/. Because only for +- IEEE754 has: "When the sum of two operands with opposite signs (or the difference of two operands with like signs) is exactly zero, the sign of that sum (or differe= nce) shall be +0 in all rounding direction modes except roundTowardNegative; in = that mode, the sign of an exact zero sum (or difference) shall be =E2=80=930. Ho= wever, x+x =3D x=E2=80=93(=E2=80=93x) retains the same sign as x even when x is zero."=