public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.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 [thread overview] Message-ID: <bug-113365-4-OHfBX5T53f@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113365-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113365 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- 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 show up more. Note if we use -O2 and change the variable to be a volatile variable (otherwise 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. There are many other targets where subnormals are slow even for double too.
next prev parent reply other threads:[~2024-01-12 23:50 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-12 23:38 [Bug c/113365] New: " newbie-02 at gmx dot de 2024-01-12 23:40 ` [Bug target/113365] " pinskia at gcc dot gnu.org 2024-01-12 23:50 ` pinskia at gcc dot gnu.org [this message] 2024-01-13 0:11 ` newbie-02 at gmx dot de 2024-01-15 15:22 ` newbie-02 at gmx dot de
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-113365-4-OHfBX5T53f@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).