From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CED6D3861877; Fri, 12 Jan 2024 23:50:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CED6D3861877 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705103444; bh=QcYo6qi1KSW/nI6nWRCRqXBUg5Ps98JCQTvaO8lJlMo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wlDu90I+4PnLfRDAjVMY2KLKjV8KvXfhNx/ZDzcRkHSVnU+sAhPnIsr7nRHzJWwD7 xt4bR/zfl2KgrlQrsZR2EDg0UactsskQ8rQncfCOulFbfMJCe+akUI6h2UNm0QkbH3 ccjyCzsPDB6AJ7t63BbNu+NwMONmWncoJHZa1t08= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113365] LONG DOUBLE: denormals: assigning a constant: factor 100 slow, Date: Fri, 12 Jan 2024 23:50:44 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: bug_status resolution 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=3D113365 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Andrew Pinski --- At -O0, GCC produces a lot of load/stores to the stack and subnormals always have a penality in HW for x87. Note double uses SSE while long double uses x87 so the effect there will sh= ow up more. Note if we use -O2 and change the variable to be a volatile variable (other= wise the loop is just optimized away), the speed difference is gone because you = no longer have addition happening of a subnormal which is what is causing the = slow down. Anyways as I mentioned this is not a GCC bug but rather a HW limitation.=20 There are many other targets where subnormals are slow even for double too.=