From: Richard Kenner Date: Thu, 6 May 1993 16:54:41 +0000 (-0400) Subject: (expand_inline_function): Don't call convert_to_mode unless we need to... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=36aa0bf595347b210b80a80be4fc561673fa5deb;p=gcc.git (expand_inline_function): Don't call convert_to_mode unless we need to... (expand_inline_function): Don't call convert_to_mode unless we need to; some converstions of VOIDmode objects can mess them up. From-SVN: r4359 --- diff --git a/gcc/integrate.c b/gcc/integrate.c index ebc219fab90..6a7fef56a9f 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -1,5 +1,5 @@ /* Procedure integration for GNU CC. - Copyright (C) 1988, 1991 Free Software Foundation, Inc. + Copyright (C) 1988, 1991, 1993 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GNU CC. @@ -1242,12 +1242,17 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add arg_vals[i] = XEXP (stack_slot, 0); } else if (GET_CODE (loc) != MEM) - /* The mode if LOC and ARG can differ if LOC was a variable - that had its mode promoted via PROMOTED_MODE. */ - arg_vals[i] = convert_to_mode (GET_MODE (loc), - expand_expr (arg, NULL_RTX, mode, - EXPAND_SUM), - TREE_UNSIGNED (TREE_TYPE (formal))); + { + if (GET_MODE (loc) != TYPE_MODE (TREE_TYPE (arg))) + /* The mode if LOC and ARG can differ if LOC was a variable + that had its mode promoted via PROMOTED_MODE. */ + arg_vals[i] = convert_to_mode (GET_MODE (loc), + expand_expr (arg, NULL_RTX, mode, + EXPAND_SUM), + TREE_UNSIGNED (TREE_TYPE (formal))); + else + arg_vals[i] = expand_expr (arg, NULL_RTX, mode, EXPAND_SUM); + } else arg_vals[i] = 0;