public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-8940] rs6000: Expand PROMOTE_MODE marco in rs6000_promote_function_mode
@ 2021-08-30 10:06 Segher Boessenkool
  0 siblings, 0 replies; only message in thread
From: Segher Boessenkool @ 2021-08-30 10:06 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7d3d198940e5b527e76da7282cc2ce59045b4844

commit r11-8940-g7d3d198940e5b527e76da7282cc2ce59045b4844
Author: Haochen Gui <guihaoc@gcc.gnu.org>
Date:   Fri Jun 4 11:04:31 2021 +0800

    rs6000: Expand PROMOTE_MODE marco in rs6000_promote_function_mode
    
    This patch prepares for the patch which disables mode
    promotion of pseudos on rs6000.
    
    gcc/ChangeLog:
            * config/rs6000/rs6000-call.c (rs6000_promote_function_mode):
            Replace PROMOTE_MODE marco with its content.
    
    (cherry picked from commit a3f6bd7891495a0ed65f7da7a55d36c730328692)

Diff:
---
 gcc/config/rs6000/rs6000-call.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
index 7059f4fab1c..38386ec6b5f 100644
--- a/gcc/config/rs6000/rs6000-call.c
+++ b/gcc/config/rs6000/rs6000-call.c
@@ -6772,7 +6772,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] only message in thread

only message in thread, other threads:[~2021-08-30 10:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 10:06 [gcc r11-8940] rs6000: Expand PROMOTE_MODE marco in rs6000_promote_function_mode 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).