(expand_call): Properly test if we need to promote operand; use
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 6 Oct 1993 02:17:23 +0000 (22:17 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 6 Oct 1993 02:17:23 +0000 (22:17 -0400)
convert_modes instead of convert_to_mode.

From-SVN: r5622

gcc/calls.c

index 9334d95..22cdf5c 100644 (file)
@@ -1540,10 +1540,11 @@ expand_call (exp, target, ignore)
        /* If we are to promote the function arg to a wider mode,
           do it now.  */
 
-       if (GET_MODE (args[i].value) != VOIDmode
-           && GET_MODE (args[i].value) != args[i].mode)
-         args[i].value = convert_to_mode (args[i].mode, args[i].value,
-                                          args[i].unsignedp);
+       if (args[i].mode != TYPE_MODE (TREE_TYPE (args[i].tree_value)))
+         args[i].value
+           = convert_modes (args[i].mode,
+                            TYPE_MODE (TREE_TYPE (args[i].tree_value)),
+                            args[i].value, args[i].unsignedp);
       }
 
 #if defined(ACCUMULATE_OUTGOING_ARGS) && defined(REG_PARM_STACK_SPACE)