public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 1/2, rs6000] Remove mode promotion for pseudos
@ 2021-05-20  9:49 HAO CHEN GUI
  2021-05-20 12:58 ` Segher Boessenkool
  0 siblings, 1 reply; 2+ messages in thread
From: HAO CHEN GUI @ 2021-05-20  9:49 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool, Bill Schmidt, David

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

Hi,

    The patch is preparatory for the patch2 - remove mode promotion for 
pseudos.

    The attachments are the patch diff and change log file.

     Bootstrapped and tested on powerpc64le-linux and powerpc64-linux 
(with both m32 and m64) with no regressions. Is this okay for trunk? Any 
recommendations? Thanks a lot.


[-- Attachment #2: ChangeLog-1 --]
[-- Type: text/plain, Size: 109 bytes --]

	* config/rs6000/rs6000-call.c (rs6000_promote_function_mode):
	Replace PROMOTE_MODE marco with its content.

[-- Attachment #3: patch1.diff --]
[-- Type: text/plain, Size: 627 bytes --]

diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
index f5676255387..dca139b2ecf 100644
--- a/gcc/config/rs6000/rs6000-call.c
+++ b/gcc/config/rs6000/rs6000-call.c
@@ -6646,7 +6646,9 @@ rs6000_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
 >------>------->-------      int *punsignedp ATTRIBUTE_UNUSED,
 >------>------->-------      const_tree, int for_return ATTRIBUTE_UNUSED)
 {
-  PROMOTE_MODE (mode, *punsignedp, type);
+  if (GET_MODE_CLASS (mode) == MODE_INT
+      && GET_MODE_SIZE (mode) < (TARGET_32BIT ? 4 : 8))
+    mode = TARGET_32BIT ? SImode : DImode;
~
   return mode;
 }

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

* Re: [PATCH 1/2, rs6000] Remove mode promotion for pseudos
  2021-05-20  9:49 [PATCH 1/2, rs6000] Remove mode promotion for pseudos HAO CHEN GUI
@ 2021-05-20 12:58 ` Segher Boessenkool
  0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2021-05-20 12:58 UTC (permalink / raw)
  To: HAO CHEN GUI; +Cc: gcc-patches, Bill Schmidt, David

[ Please send attachments as plain text, not as base64 ]

On Thu, May 20, 2021 at 05:49:50PM +0800, HAO CHEN GUI wrote:
> 	* config/rs6000/rs6000-call.c (rs6000_promote_function_mode):
> 	Replace PROMOTE_MODE marco with its content.

> diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
> index f5676255387..dca139b2ecf 100644
> --- a/gcc/config/rs6000/rs6000-call.c
> +++ b/gcc/config/rs6000/rs6000-call.c
> @@ -6646,7 +6646,9 @@ rs6000_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
>  >------>------->-------      int *punsignedp ATTRIBUTE_UNUSED,
>  >------>------->-------      const_tree, int for_return ATTRIBUTE_UNUSED)
>  {
> -  PROMOTE_MODE (mode, *punsignedp, type);
> +  if (GET_MODE_CLASS (mode) == MODE_INT
> +      && GET_MODE_SIZE (mode) < (TARGET_32BIT ? 4 : 8))
> +    mode = TARGET_32BIT ? SImode : DImode;
> ~
>    return mode;
>  }

This is fine (of course).  Okay for trunk.  Thanks!


Segher

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

end of thread, other threads:[~2021-05-20 12:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20  9:49 [PATCH 1/2, rs6000] Remove mode promotion for pseudos HAO CHEN GUI
2021-05-20 12:58 ` Segher Boessenkool

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