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 c/105134] tree-vectorize produces error code
Date: Wed, 30 Nov 2022 03:42:56 +0000	[thread overview]
Message-ID: <bug-105134-4-prtOQEBGYw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105134-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to piliu from comment #10)
> (In reply to Andrew Pinski from comment #7)
> > I am trying to understand this. Is it ok to use the SSE registers inside
> > purgatory or not?
> > 
> 
> SSE can speed up the program, and if possible it is suggested to turn on.
> 
> Any guideline about when it can not be used?

Yes if you are inside the kernel/bootloader SSE might not be turned on. So my
question here. Normal parts of the kernel cannot use SSE instructions either
which is why there is an option to turn it off.
Maybe it is best to ask the kexec-tools folks if SSE can be used here.
I suspect you cannot.
GCC was not emitting SSE instructions before and now is at -O2 which is why
-fno-tree-vectorize works as it turns off emitting of SSE instructions again.

There is nothing wrong with what GCC emits for sha256_starts for the options
kexec-tools supplied even, just it is supplying the wrong set of options in the
first place.

For user code SSE code is always fine as the compiler and glibc has been using
SSE code early on. As I said it if it is a bootloader/kernel, then you have to
ask is SSE turned on or not and do we save/restore the registers correctly,
etc.

  parent reply	other threads:[~2022-11-30  3:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-02  2:43 [Bug c/105134] New: " piliu at redhat dot com
2022-04-02  3:01 ` [Bug c/105134] " piliu at redhat dot com
2022-04-02  5:28 ` piliu at redhat dot com
2022-04-04  7:15 ` rguenth at gcc dot gnu.org
2022-04-06  2:12 ` piliu at redhat dot com
2022-04-06  2:14 ` piliu at redhat dot com
2022-04-06  2:17 ` piliu at redhat dot com
2022-11-25 22:53 ` pinskia at gcc dot gnu.org
2022-11-25 23:00 ` pinskia at gcc dot gnu.org
2022-11-25 23:03 ` pinskia at gcc dot gnu.org
2022-11-30  3:32 ` piliu at redhat dot com
2022-11-30  3:42 ` pinskia at gcc dot gnu.org [this message]
2024-02-21  0:40 ` [Bug tree-optimization/105134] " pinskia 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-105134-4-prtOQEBGYw@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).