public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Peter Bergner <bergner@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH] rs6000: Disable optimizing multiple xxsetaccz instructions into one xxsetaccz
Date: Mon, 13 Sep 2021 17:10:42 -0500	[thread overview]
Message-ID: <190af4bb-8668-f133-bab6-69c04b004018@linux.ibm.com> (raw)
In-Reply-To: <20210912192634.GF1583@gate.crashing.org>

On 9/12/21 2:26 PM, Segher Boessenkool wrote:
>> I also removed the mma_xxsetaccz define_expand and
>> define_insn_and_split and replaced it with a simple define_insn.
> 
> In the future pleaase do that in a separate patch.  That makes it *much*
> easier to read and review this.

Will do.



>> 	* config/rs6000/mma.md (unspec): Delete UNSPEC_MMA_XXSETACCZ.
>> 	(unspecv): Add UNSPECV_MMA_XXSETACCZ.
> 
> Unrelated to this patch, but I have been wondering this for years:
> should we have an unspecv enum at all?  It causes some churn, and you
> can name the volatile ones UNSPECV_ in either case.

I assumed it was needed, but if not, yeah, one enum would seem to be
better than two.




>> 	(mma_xxsetaccz): Change to define_insn.  Remove match_operand.
>> 	Use UNSPECV_MMA_XXSETACCZ.
> 
> It still has the match_operand.

-(define_insn_and_split "*mma_xxsetaccz"
+(define_insn "mma_xxsetaccz"
   [(set (match_operand:XO 0 "fpr_reg_operand" "=d")
-       (unspec:XO [(match_operand 1 "const_0_to_1_operand" "O")]
-        UNSPEC_MMA_XXSETACCZ))]
+       (unspec_volatile:XO [(const_int 0)]
+                           UNSPECV_MMA_XXSETACCZ))]


It still has "a" match_operand...for operand 0.  The match_operand
for operand 1 was what was removed.  Want me to reword that as
"Remove source match_operand." or "Remove match_operand 1." or ???



>>  ;; We can't have integer constants in XOmode so we wrap this in an UNSPEC.
> 
> Does the comment need updating?  It may help to point out here that itr
>  needs to be volatile.

I think the comment was referring to the unneeded operand which I have
now removed.  I could either remove the comment altogether or change it
to:

;; We can't have integer constants in XOmode so we wrap this in an
;; UNSPEC_VOLATILE.

...to refer to the dummy zero for the source.  Let me know what you want.



>>     (set_attr "length" "4")])
> 
> Not new of course: the default length is 4, most insns have that, it
> helps to be less verbose.

I'll remove that before pushing, thanks!


Peter


  reply	other threads:[~2021-09-13 22:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27 19:58 Peter Bergner
2021-09-12 15:32 ` Bill Schmidt
2021-09-12 19:26 ` Segher Boessenkool
2021-09-13 22:10   ` Peter Bergner [this message]
2021-09-14  0:17     ` Segher Boessenkool
2021-09-14 15:58       ` Peter Bergner

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=190af4bb-8668-f133-bab6-69c04b004018@linux.ibm.com \
    --to=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.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).