From 8c9a36b7cac01afb70ca41c1435efb2077202035 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Fri, 8 Aug 2014 05:31:44 +0000 Subject: calls.c (precompute_arguments): Check promoted_for_signed_and_unsigned_p and set the promoted mode. gcc 2014-08-08 Kugan Vivekanandarajah * calls.c (precompute_arguments): Check promoted_for_signed_and_unsigned_p and set the promoted mode. (promoted_for_signed_and_unsigned_p): New function. (expand_expr_real_1): Check promoted_for_signed_and_unsigned_p and set the promoted mode. * expr.h (promoted_for_signed_and_unsigned_p): New function definition. * cfgexpand.c (expand_gimple_stmt_1): Call emit_move_insn if SUBREG is promoted with SRP_SIGNED_AND_UNSIGNED. gcc/testsuite 2014-08-08 Kugan Vivekanandarajah * gcc.dg/zero_sign_ext_test.c: New test. From-SVN: r213750 --- gcc/cfgexpand.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/cfgexpand.c') diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 0e9410e..f6da5d6 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -3320,7 +3320,13 @@ expand_gimple_stmt_1 (gimple stmt) GET_MODE (target), temp, unsignedp); } - convert_move (SUBREG_REG (target), temp, unsignedp); + if ((SUBREG_PROMOTED_GET (target) == SRP_SIGNED_AND_UNSIGNED) + && (GET_CODE (temp) == SUBREG) + && (GET_MODE (target) == GET_MODE (temp)) + && (GET_MODE (SUBREG_REG (target)) == GET_MODE (SUBREG_REG (temp)))) + emit_move_insn (SUBREG_REG (target), SUBREG_REG (temp)); + else + convert_move (SUBREG_REG (target), temp, unsignedp); } else if (nontemporal && emit_storent_insn (target, temp)) ; -- cgit v1.1