public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jschoen4 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/103393] [12 Regression] Generating 256bit register usage with -mprefer-avx128 -mprefer-vector-width=128
Date: Wed, 24 Nov 2021 20:38:59 +0000	[thread overview]
Message-ID: <bug-103393-4-uOXsE6vOmY@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103393-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103393

--- Comment #4 from John S <jschoen4 at gmail dot com> ---
I can Confirm from my side that it does appear to be the memmove inline
expansion and not the auto vectorizer.  It also occurs with
builtin_memset/builtin_memcpy as well.

For some context, this is an issue would prevent the usage of gcc in my
production environment.  It will certainly impact other use cases outside of my
own as well.  For example, it becomes impossible to use "-mno-vzeroupper -mavx
-mpreferred-vector-width=128" and use _mm256_xxx + _mm256_zeroupper()
intrinsics to properly manage the ymm state (clear or not) since the compiler
is now able to insert ymm's almost anywhere via the memmove inlining.

Up until now the prefer-width has always behaved as in a way that all auto
generated vector uses will not exceed the preferred width.  Only explicit use
of the _mm256/_mm512_ .. intrinsics or the "vector types" i.e. `__m256 var;
__m512 var;` would result in wider register usage.

I do believe Clang/icc behave this way as well and there are dependencies on
this behavior.  The same also applies w/ avx-512 enabled with ZMM usage +
prefer=128/256 where the downclocking issues can be even more pronounced.

  parent reply	other threads:[~2021-11-24 20:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 19:20 [Bug tree-optimization/103393] New: [ 12 Regression ] Auto vectorizer generating " jschoen4 at gmail dot com
2021-11-24  8:57 ` [Bug tree-optimization/103393] [12 Regression] Generating " rguenth at gcc dot gnu.org
2021-11-24 13:45 ` [Bug target/103393] " hjl.tools at gmail dot com
2021-11-24 13:53 ` rguenth at gcc dot gnu.org
2021-11-24 20:38 ` jschoen4 at gmail dot com [this message]
2021-11-25  1:15 ` crazylht at gmail dot com
2021-11-25  1:25 ` crazylht at gmail dot com
2021-11-25  7:16 ` rguenther at suse dot de
2021-11-25  7:28 ` [Bug middle-end/103393] " rguenth at gcc dot gnu.org
2021-11-25  7:40 ` rguenth at gcc dot gnu.org
2021-11-25 17:57 ` jakub at gcc dot gnu.org
2021-11-25 18:09 ` jakub at gcc dot gnu.org
2021-11-25 20:54 ` rearnsha at gcc dot gnu.org
2021-11-25 20:57 ` rearnsha at gcc dot gnu.org
2021-11-25 22:49 ` hjl.tools at gmail dot com
2021-11-26 11:31 ` rearnsha at gcc dot gnu.org
2021-11-26 11:37 ` jakub at gcc dot gnu.org
2021-11-26 11:44 ` rearnsha at gcc dot gnu.org
2021-11-26 11:48 ` jakub at gcc dot gnu.org
2021-11-26 11:51 ` rearnsha at gcc dot gnu.org
2021-11-26 11:58 ` jakub at gcc dot gnu.org
2021-11-26 12:26 ` rguenth at gcc dot gnu.org
2021-11-26 12:51 ` rearnsha at gcc dot gnu.org
2022-03-01 22:41 ` hjl.tools at gmail dot com
2022-03-02 14:52 ` hjl.tools at gmail dot com
2022-03-31  7:31 ` rguenth 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-103393-4-uOXsE6vOmY@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: link
Be 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).