public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/97707] avx512 math function invoked even if -mprefer-vector-width=256 specified Date: Wed, 04 Nov 2020 08:24:04 +0000 [thread overview] Message-ID: <bug-97707-4-EcjYL4T75M@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97707-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97707 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |jakub at gcc dot gnu.org Blocks| |53947 Target| |x86_64-*-* i?86-*-* Ever confirmed|0 |1 Last reconfirmed| |2020-11-04 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- -mprefer-vector-width=256 means it _prefers_ AVX256 but then in case vectorization fails (for whatever bogus reason) with AVX256 it will still try AVX512: static unsigned int ix86_autovectorize_vector_modes (vector_modes *modes, bool all) { if (TARGET_AVX512F && !TARGET_PREFER_AVX256) { modes->safe_push (V64QImode); modes->safe_push (V32QImode); modes->safe_push (V16QImode); } else if (TARGET_AVX512F && all) { modes->safe_push (V32QImode); modes->safe_push (V16QImode); modes->safe_push (V64QImode); } the odd thing is that the dumps suggest we use V4DFmode. We use a VF of 8 because of V8SI and it seems that call vectorization then chooses the larger vector mode because it is supported - it seems to have its own idea of costing there (probably reasonable). Do you think this is a bad idea? Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947 [Bug 53947] [meta-bug] vectorizer missed-optimizations
next prev parent reply other threads:[~2020-11-04 8:24 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-03 18:05 [Bug tree-optimization/97707] New: avx12 " vincenzo.innocente at cern dot ch 2020-11-04 8:24 ` rguenth at gcc dot gnu.org [this message] 2020-11-04 8:47 ` [Bug tree-optimization/97707] avx512 " jakub at gcc dot gnu.org 2020-11-04 8:57 ` vincenzo.innocente at cern dot ch 2020-11-04 8:59 ` jakub at gcc dot gnu.org
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-97707-4-EcjYL4T75M@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).