public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "crazylht at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/100076] eembc/automotive/basefp01 has 30.3% regression compare -O2 -ftree-vectorize with -O2 on CLX/Znver3 Date: Thu, 15 Apr 2021 09:23:40 +0000 [thread overview] Message-ID: <bug-100076-4-i1Hq2qKpyt@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100076-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100076 --- Comment #6 from Hongtao.liu <crazylht at gmail dot com> --- (In reply to Richard Biener from comment #5) > Note even when avoiding the STLF hit the vectorized version is slower. > You can use -mtune-ctl=^sse_unaligned_load_optimal to force loading > the lower/upper half of vectors separately. > This leads to extra instructions(extra 2 loads), and if the vectorizer knew that, it would find that the cost of vectorization is larger than scalar. > The reason is that without -ffast-math we are using an in-order reduction > which doesn't save us much but instead just combines dependence chains > here. We do have a related bug for this somewhere. > > With -ffast-math the version with/without > -mtune-ctl=^sse_unaligned_load_optimal > is about the same speed, so STLF is a red herring here (on Zen2). > > Still not vectorizing is a lot faster. > Yes, As far as vectorization is concerned, vectorization does not improve performance here(compare -O2 -funroll-loops vs -O2 -ftree-vectorize -funroll-loops) so I'm wondering if we can adjust the heuristic or cost model so that the loop is not vectorized. > Can you check if -mtune-ctl=^sse_unaligned_load_optimal helps on CLX? doesn't help.
prev parent reply other threads:[~2021-04-15 9:23 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-14 2:21 [Bug tree-optimization/100076] New: eembc/automotive/basefp01 has 30.3% regression compare -O2 -ftree-vectorize with -O2 on SKX/CLX crazylht at gmail dot com 2021-04-14 3:16 ` [Bug tree-optimization/100076] eembc/automotive/basefp01 has 30.3% regression compare -O2 -ftree-vectorize with -O2 on CLX/Znver3 hjl.tools at gmail dot com 2021-04-14 5:28 ` crazylht at gmail dot com 2021-04-14 7:08 ` rguenth at gcc dot gnu.org 2021-04-14 8:22 ` crazylht at gmail dot com 2021-04-15 7:35 ` rguenth at gcc dot gnu.org 2021-04-15 9:23 ` crazylht at gmail dot com [this message]
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-100076-4-i1Hq2qKpyt@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).