public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: David Edelsohn <dje.gcc@gmail.com>
Cc: HAO CHEN GUI <guihaoc@linux.ibm.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	Bill Schmidt <wschmidt@linux.ibm.com>
Subject: Re: [PATCH, rs6000] Implement mffscrni pattern
Date: Sat, 18 Dec 2021 15:25:49 -0600	[thread overview]
Message-ID: <20211218212549.GT614@gate.crashing.org> (raw)
In-Reply-To: <CAGWvnyk8-Ed3--M8CkYsgOWESBjhAz9fWdFncwvQ=SymNjvRvg@mail.gmail.com>

On Fri, Dec 17, 2021 at 10:33:12PM -0500, David Edelsohn wrote:
> On Thu, Dec 16, 2021 at 9:43 PM HAO CHEN GUI <guihaoc@linux.ibm.com> wrote:
> > +(define_insn "rs6000_mffscrni"
> > +  [(set (match_operand:DF 0 "gpc_reg_operand" "=d")
> > +       (unspec_volatile:DF [(match_operand:DF 1 "u2bit_cint_operand" "n")]
> 
> Why is this input operand 1 DFmode?  This is a 2 bit integer value.
> This pattern is called from rs6000_set_fpscr_rn with an SImode
> operand, and it seems that this should be SImode as well.

Yup.  This predicate will only allow const_int, and matching a const_int
ignores the mode, so most (or all?) things will work whatever mode you
give here.  But only MODE_INT modes make sense (and possibly VOIDmode,
but VOIDmode in machine descriptions means anything is allowed, also not
what you want here).


Segher

  reply	other threads:[~2021-12-18 21:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17  2:43 HAO CHEN GUI
2021-12-18  3:33 ` David Edelsohn
2021-12-18 21:25   ` Segher Boessenkool [this message]
2021-12-20  5:55 HAO CHEN GUI
2021-12-20 15:55 ` David Edelsohn
2021-12-20 23:14 ` Segher Boessenkool

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=20211218212549.GT614@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=guihaoc@linux.ibm.com \
    --cc=wschmidt@linux.ibm.com \
    /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).