public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix typo in insn name.
@ 2023-07-10 19:59 Michael Meissner
  2023-07-10 20:10 ` Segher Boessenkool
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Michael Meissner @ 2023-07-10 19:59 UTC (permalink / raw)
  To: gcc-patches, Michael Meissner, Segher Boessenkool, Kewen.Lin,
	David Edelsohn, Peter Bergner

In doing other work, I noticed that there was an insn:

	vsx_extract_v4sf_<mode>_load

Which did not have an iterator.  I removed the useless <mode>.

I have tested this patch on the following systems and there was no degration.
Can I check it into the trunk branch?

    *	Power10, LE, --with-cpu=power10, IBM 128-bit long double
    *	Power9,  LE, --with-cpu=power9,  IBM 128-bit long double
    *	Power9,  LE, --with-cpu=power9,  IEEE 128-bit long double
    *   Power9,  LE, --with-cpu=power9,  64-bit default long double
    *	Power9,  BE, --with-cpu=power9,  IBM 128-bit long double
    *	Power8,  BE, --with-cpu=power8,  IBM 128-bit long double

2023-07-10  Michael Meissner  <meissner@linux.ibm.com>

gcc/

	* config/rs6000/vsx.md (vsx_extract_v4sf_load): Rename from
	vsx_extract_v4sf_<mode>_load.
---
 gcc/config/rs6000/vsx.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md
index d34c3b21abe..aed450e31ec 100644
--- a/gcc/config/rs6000/vsx.md
+++ b/gcc/config/rs6000/vsx.md
@@ -3576,7 +3576,7 @@ (define_insn_and_split "vsx_extract_v4sf"
   [(set_attr "length" "8")
    (set_attr "type" "fp")])
 
-(define_insn_and_split "*vsx_extract_v4sf_<mode>_load"
+(define_insn_and_split "*vsx_extract_v4sf_load"
   [(set (match_operand:SF 0 "register_operand" "=f,v,v,?r")
 	(vec_select:SF
 	 (match_operand:V4SF 1 "memory_operand" "m,Z,m,m")
-- 
2.41.0


-- 
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meissner@linux.ibm.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix typo in insn name.
  2023-07-10 19:59 [PATCH] Fix typo in insn name Michael Meissner
@ 2023-07-10 20:10 ` Segher Boessenkool
  2023-07-10 22:25   ` Michael Meissner
  2023-07-24 18:44 ` Ping: " Michael Meissner
  2023-07-26  5:54 ` Kewen.Lin
  2 siblings, 1 reply; 6+ messages in thread
From: Segher Boessenkool @ 2023-07-10 20:10 UTC (permalink / raw)
  To: Michael Meissner, gcc-patches, Kewen.Lin, David Edelsohn, Peter Bergner

Hi!

On Mon, Jul 10, 2023 at 03:59:44PM -0400, Michael Meissner wrote:
> In doing other work, I noticed that there was an insn:
> 
> 	vsx_extract_v4sf_<mode>_load
> 
> Which did not have an iterator.  I removed the useless <mode>.

This patch does that, you mean.

> --- a/gcc/config/rs6000/vsx.md
> +++ b/gcc/config/rs6000/vsx.md
> @@ -3576,7 +3576,7 @@ (define_insn_and_split "vsx_extract_v4sf"
>    [(set_attr "length" "8")
>     (set_attr "type" "fp")])
>  
> -(define_insn_and_split "*vsx_extract_v4sf_<mode>_load"
> +(define_insn_and_split "*vsx_extract_v4sf_load"
>    [(set (match_operand:SF 0 "register_operand" "=f,v,v,?r")
>  	(vec_select:SF
>  	 (match_operand:V4SF 1 "memory_operand" "m,Z,m,m")

Does this fix any ICEs?  Or do you have some example that makes better
machine code after this change?  Or would a better change perhaps be to
just remove this pattern completely, if it doesn't do anything useful?

I.e., please include a new testcase.


Segher

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix typo in insn name.
  2023-07-10 20:10 ` Segher Boessenkool
@ 2023-07-10 22:25   ` Michael Meissner
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Meissner @ 2023-07-10 22:25 UTC (permalink / raw)
  To: Segher Boessenkool
  Cc: Michael Meissner, gcc-patches, Kewen.Lin, David Edelsohn, Peter Bergner

On Mon, Jul 10, 2023 at 03:10:21PM -0500, Segher Boessenkool wrote:
> Hi!
> 
> On Mon, Jul 10, 2023 at 03:59:44PM -0400, Michael Meissner wrote:
> > In doing other work, I noticed that there was an insn:
> > 
> > 	vsx_extract_v4sf_<mode>_load
> > 
> > Which did not have an iterator.  I removed the useless <mode>.
> 
> This patch does that, you mean.
> 
> > --- a/gcc/config/rs6000/vsx.md
> > +++ b/gcc/config/rs6000/vsx.md
> > @@ -3576,7 +3576,7 @@ (define_insn_and_split "vsx_extract_v4sf"
> >    [(set_attr "length" "8")
> >     (set_attr "type" "fp")])
> >  
> > -(define_insn_and_split "*vsx_extract_v4sf_<mode>_load"
> > +(define_insn_and_split "*vsx_extract_v4sf_load"
> >    [(set (match_operand:SF 0 "register_operand" "=f,v,v,?r")
> >  	(vec_select:SF
> >  	 (match_operand:V4SF 1 "memory_operand" "m,Z,m,m")
> 
> Does this fix any ICEs?  Or do you have some example that makes better
> machine code after this change?  Or would a better change perhaps be to
> just remove this pattern completely, if it doesn't do anything useful?
> 
> I.e., please include a new testcase.

There is absolutely no code change.  It is purely a cleanup patch.  In doing
other patches, I just noticed that pattern had a _<mode> in it when it didn't
have an iterator.  I just cleaned up the code removing _<mode>.  I probably
should have changed it to vsx_extract_v4sf_sf_load.

-- 
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meissner@linux.ibm.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Ping: [PATCH] Fix typo in insn name.
  2023-07-10 19:59 [PATCH] Fix typo in insn name Michael Meissner
  2023-07-10 20:10 ` Segher Boessenkool
@ 2023-07-24 18:44 ` Michael Meissner
  2023-07-26  5:54 ` Kewen.Lin
  2 siblings, 0 replies; 6+ messages in thread
From: Michael Meissner @ 2023-07-24 18:44 UTC (permalink / raw)
  To: Michael Meissner, gcc-patches, Segher Boessenkool, Kewen.Lin,
	David Edelsohn, Peter Bergner

Ping clean-up patch.

| Date: Mon, 10 Jul 2023 15:59:44 -0400
| From: Michael Meissner <meissner@linux.ibm.com>
| Subject: [PATCH] Fix typo in insn name.
| Message-ID: <ZKxjMDOl1K/d5z23@cowardly-lion.the-meissners.org>

As I said in the reply, the only thing this patch does is to rename
vsx_extract_v4sf_<mode>_load to vsx_extract_v4sf_load since the insn does not
use a mode iterator.

-- 
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meissner@linux.ibm.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix typo in insn name.
  2023-07-10 19:59 [PATCH] Fix typo in insn name Michael Meissner
  2023-07-10 20:10 ` Segher Boessenkool
  2023-07-24 18:44 ` Ping: " Michael Meissner
@ 2023-07-26  5:54 ` Kewen.Lin
  2023-07-26 21:53   ` Michael Meissner
  2 siblings, 1 reply; 6+ messages in thread
From: Kewen.Lin @ 2023-07-26  5:54 UTC (permalink / raw)
  To: Michael Meissner
  Cc: gcc-patches, Segher Boessenkool, David Edelsohn, Peter Bergner

Hi Mike,

on 2023/7/11 03:59, Michael Meissner wrote:
> In doing other work, I noticed that there was an insn:
> 
> 	vsx_extract_v4sf_<mode>_load
> 
> Which did not have an iterator.  I removed the useless <mode>.

It actually has a mode iterator, the "P" is used for clobber.

The whole pattern of this define_insn_and_split is

(define_insn_and_split "*vsx_extract_v4sf_<mode>_load"
  [(set (match_operand:SF 0 "register_operand" "=f,v,v,?r")
	(vec_select:SF
	 (match_operand:V4SF 1 "memory_operand" "m,Z,m,m")
	 (parallel [(match_operand:QI 2 "const_0_to_3_operand" "n,n,n,n")])))
   (clobber (match_scratch:P 3 "=&b,&b,&b,&b"))]         <== *P used here*

Its definition is:

(define_mode_iterator P [(SI "TARGET_32BIT") (DI "TARGET_64BIT")])

I guess we can just leave it there?

BR,
Kewen

> 
> I have tested this patch on the following systems and there was no degration.
> Can I check it into the trunk branch?
> 
>     *	Power10, LE, --with-cpu=power10, IBM 128-bit long double
>     *	Power9,  LE, --with-cpu=power9,  IBM 128-bit long double
>     *	Power9,  LE, --with-cpu=power9,  IEEE 128-bit long double
>     *   Power9,  LE, --with-cpu=power9,  64-bit default long double
>     *	Power9,  BE, --with-cpu=power9,  IBM 128-bit long double
>     *	Power8,  BE, --with-cpu=power8,  IBM 128-bit long double
> 
> 2023-07-10  Michael Meissner  <meissner@linux.ibm.com>
> 
> gcc/
> 
> 	* config/rs6000/vsx.md (vsx_extract_v4sf_load): Rename from
> 	vsx_extract_v4sf_<mode>_load.
> ---
>  gcc/config/rs6000/vsx.md | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md
> index d34c3b21abe..aed450e31ec 100644
> --- a/gcc/config/rs6000/vsx.md
> +++ b/gcc/config/rs6000/vsx.md
> @@ -3576,7 +3576,7 @@ (define_insn_and_split "vsx_extract_v4sf"
>    [(set_attr "length" "8")
>     (set_attr "type" "fp")])
>  
> -(define_insn_and_split "*vsx_extract_v4sf_<mode>_load"
> +(define_insn_and_split "*vsx_extract_v4sf_load"
>    [(set (match_operand:SF 0 "register_operand" "=f,v,v,?r")
>  	(vec_select:SF
>  	 (match_operand:V4SF 1 "memory_operand" "m,Z,m,m")




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix typo in insn name.
  2023-07-26  5:54 ` Kewen.Lin
@ 2023-07-26 21:53   ` Michael Meissner
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Meissner @ 2023-07-26 21:53 UTC (permalink / raw)
  To: Kewen.Lin
  Cc: Michael Meissner, gcc-patches, Segher Boessenkool,
	David Edelsohn, Peter Bergner

On Wed, Jul 26, 2023 at 01:54:01PM +0800, Kewen.Lin wrote:
> Hi Mike,
> 
> on 2023/7/11 03:59, Michael Meissner wrote:
> > In doing other work, I noticed that there was an insn:
> > 
> > 	vsx_extract_v4sf_<mode>_load
> > 
> > Which did not have an iterator.  I removed the useless <mode>.
> 
> It actually has a mode iterator, the "P" is used for clobber.
> 
> The whole pattern of this define_insn_and_split is
> 
> (define_insn_and_split "*vsx_extract_v4sf_<mode>_load"
>   [(set (match_operand:SF 0 "register_operand" "=f,v,v,?r")
> 	(vec_select:SF
> 	 (match_operand:V4SF 1 "memory_operand" "m,Z,m,m")
> 	 (parallel [(match_operand:QI 2 "const_0_to_3_operand" "n,n,n,n")])))
>    (clobber (match_scratch:P 3 "=&b,&b,&b,&b"))]         <== *P used here*
> 
> Its definition is:
> 
> (define_mode_iterator P [(SI "TARGET_32BIT") (DI "TARGET_64BIT")])
> 
> I guess we can just leave it there?
> 
> BR,
> Kewen

Yes, I didn't notice the :P in the insn.

-- 
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meissner@linux.ibm.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-26 21:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-10 19:59 [PATCH] Fix typo in insn name Michael Meissner
2023-07-10 20:10 ` Segher Boessenkool
2023-07-10 22:25   ` Michael Meissner
2023-07-24 18:44 ` Ping: " Michael Meissner
2023-07-26  5:54 ` Kewen.Lin
2023-07-26 21:53   ` Michael Meissner

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).