aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2014-11-28 15:27:55 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2014-11-28 07:27:55 -0800
commit51e5fd69c64bdd22b0931e8724f18b53bf95c6b7 (patch)
treeebf1ddbfdab56b68e19c94f17ac00f8333b23d1c /gcc/combine.c
parentf101d09c2a3edf21e053dc7e8c49cedf23a7a2cd (diff)
downloadgcc-51e5fd69c64bdd22b0931e8724f18b53bf95c6b7.zip
gcc-51e5fd69c64bdd22b0931e8724f18b53bf95c6b7.tar.gz
gcc-51e5fd69c64bdd22b0931e8724f18b53bf95c6b7.tar.bz2
Pass unpromoted argument to promote_function_mode
This patch updates setup_incoming_promotions in combine.c to match what is actually passed in assign_parm_setup_reg in function.c. gcc/ PR rtl-optimization/64037 * combine.c (setup_incoming_promotions): Pass the argument before any promotions happen to promote_function_mode. gcc/testsuite/ PR rtl-optimization/64037 * g++.dg/pr64037.C: New test. From-SVN: r218161
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 1808f97..a0449a2 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -1561,8 +1561,8 @@ setup_incoming_promotions (rtx_insn *first)
uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg));
/* The mode and signedness of the argument as it is actually passed,
- after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */
- mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3,
+ see assign_parm_setup_reg in function.c. */
+ mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns1,
TREE_TYPE (cfun->decl), 0);
/* The mode of the register in which the argument is being passed. */