public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "segher at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/100736] ICE: unrecognizable insn
Date: Wed, 24 Aug 2022 20:45:46 +0000	[thread overview]
Message-ID: <bug-100736-4-ARkL6fgEym@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100736-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from Segher Boessenkool <segher at gcc dot gnu.org> ---
There are so many things here, it's hard to start.  Two big things:

Firstly, this is not floating point at all, so -ffinite-math-only should not
make any difference.  We currently abuse CCFP (in a non-safe way), this should
be fixed.

Secondly, -mcpu=power9 (to get isel) or -mcpu=power10 (to get setbc) are more
interesting.  What is the generated machine code for those?

More things:

crnot is needed to get the polarity of the result correct.  We could instead
do a xori 1 (or similar) on the eventual GPR.  If we do say a cror and a crnot
we should make this can be combined to a crnor (all 14 logic functions are
supported), but if the inversion is done in the GPR (with such a xori, say),
this is much harder to optimise.

If we are not interested in overflows, always one of LT GT EQ is set, so we
never need any crlogical insn here.

To be exact, this is whenever we have valid inputs: if there is output
overflow cr6.3 will be set as well, but still exactly one of cr6.0, cr6.1,
cr6.2 will be set.

But if there is an invalid *input* cr6 is set to 0b0001 always.  I don't think
we need to care here (otoh it isn't obvious how to best model it!)

  parent reply	other threads:[~2022-08-24 20:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24  6:04 [Bug target/100736] New: " asolokha at gmx dot com
2021-06-03  0:11 ` [Bug target/100736] " segher at gcc dot gnu.org
2021-12-08  7:17 ` guihaoc at gcc dot gnu.org
2021-12-08 22:13 ` segher at gcc dot gnu.org
2021-12-09  1:49 ` guihaoc at gcc dot gnu.org
2022-08-24  3:57 ` bergner at gcc dot gnu.org
2022-08-24 20:45 ` segher at gcc dot gnu.org [this message]
2024-04-23  5:37 ` guojiufu 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-100736-4-ARkL6fgEym@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).