public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kewen.Lin" <linkw@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>,
	Peter Bergner <bergner@linux.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	David Edelsohn <dje.gcc@gmail.com>,
	will schmidt <will_schmidt@vnet.ibm.com>
Subject: Re: [PATCH v3] rs6000: Adjust mov optabs for opaque modes [PR103353]
Date: Fri, 24 Jun 2022 09:03:59 +0800	[thread overview]
Message-ID: <6ded988f-6684-e42e-ca82-d81ff55178d2@linux.ibm.com> (raw)
In-Reply-To: <20220623190619.GU25951@gate.crashing.org>

Hi Segher,

Thanks for the comments.

on 2022/6/24 03:06, Segher Boessenkool wrote:
> Hi!
> 
> On Wed, May 18, 2022 at 10:07:48PM +0800, Kewen.Lin wrote:
>> As PR103353 shows, we may want to continue to expand a MMA built-in
>> function like a normal function, even if we have already emitted
>> error messages about some missing required conditions.  As shown in
>> that PR, without one explicit mov optab on OOmode provided, it would
>> call emit_move_insn recursively.
> 
> First off: lxvp is a VSX insn, not an MMA insn.  So please don't call it
> that -- this confusion is what presumably caused the problem here, so it
> would be good to root it out :-)
> 

I guess the "it" in "don't call it call" is for "MMA built-in function"?
It comes from the current code:

;   mma      Needs special handling for MMA
;   quad     MMA instruction using a register quad as an input operand
;   pair     MMA instruction using a register pair as an input operand

  v256 __builtin_vsx_lxvp (unsigned long, const v256 *);
    LXVP nothing {mma}

  void __builtin_vsx_stxvp (v256, unsigned long, const v256 *);
    STXVP nothing {mma,pair}

...

>> +  /* Opaque modes are only expected to be available when MMA is supported,
> 
> Why do people expect that?  It is completely wrong.  The name "opaque"
> itself already says this is not just for MMA, but perhaps more
> importantly, it is a basic VSX insn, doesn't touch any MMA resources,
> and is useful in other contexts as well.
> 

... The above statements are also based on current code, for now, the
related things like built-in functions, mov optab, hard_regno_ok etc.
for these two modes are guarded by TARGET_MMA.

I think I get your points here, you want to separate these opaque
modes from MMA since the underlying lxvp/stxvp are not MMA specific,
so those related things (bifs, mov optabs etc.) are not necessarily
guarded under MMA.

> So this needs some bigger surgery.

Yes, Peter may have more comments on this.

BR,
Kewen

  reply	other threads:[~2022-06-24  1:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18 14:07 Kewen.Lin
2022-06-06  8:53 ` PING^1 " Kewen.Lin
2022-06-23  2:02   ` PING^2 " Kewen.Lin
2022-06-23 19:06 ` Segher Boessenkool
2022-06-24  1:03   ` Kewen.Lin [this message]
2022-06-24 16:49     ` Segher Boessenkool
2022-06-27  2:47       ` Kewen.Lin
2022-07-28  8:49         ` PING^1 [PATCH v4] " Kewen.Lin
2022-08-15  8:07           ` PING^2 " Kewen.Lin
2022-08-15 21:30         ` [PATCH v3] " Segher Boessenkool
2022-08-16  5:53           ` Kewen.Lin

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=6ded988f-6684-e42e-ca82-d81ff55178d2@linux.ibm.com \
    --to=linkw@linux.ibm.com \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    --cc=will_schmidt@vnet.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).