]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000: Expand PROMOTE_MODE marco in rs6000_promote_function_mode
authorHaochen Gui <guihaoc@gcc.gnu.org>
Fri, 4 Jun 2021 03:04:31 +0000 (11:04 +0800)
committerHaochen Gui <guihaoc@gcc.gnu.org>
Fri, 4 Jun 2021 03:40:24 +0000 (11:40 +0800)
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.

gcc/config/rs6000/rs6000-call.c

index f271b0a4079579ac7b8462aa3a38fd711bd120cd..b4e13af4dc6e7112c7fffef4efe0ee4111100f0c 100644 (file)
@@ -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;
 }