diff options
author | Kugan Vivekanandarajah <kuganv@linaro.org> | 2014-08-08 05:31:44 +0000 |
---|---|---|
committer | Kugan Vivekanandarajah <kugan@gcc.gnu.org> | 2014-08-08 05:31:44 +0000 |
commit | 8c9a36b7cac01afb70ca41c1435efb2077202035 (patch) | |
tree | 564b60254e3780325da325e3491a46fca2b8c908 /gcc/cfgexpand.c | |
parent | 362d42dcc965c63977160984292b3429c2d15de7 (diff) | |
download | gcc-8c9a36b7cac01afb70ca41c1435efb2077202035.zip gcc-8c9a36b7cac01afb70ca41c1435efb2077202035.tar.gz gcc-8c9a36b7cac01afb70ca41c1435efb2077202035.tar.bz2 |
calls.c (precompute_arguments): Check promoted_for_signed_and_unsigned_p and set the promoted mode.
gcc
2014-08-08 Kugan Vivekanandarajah <kuganv@linaro.org>
* 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 <kuganv@linaro.org>
* gcc.dg/zero_sign_ext_test.c: New test.
From-SVN: r213750
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 8 |
1 files changed, 7 insertions, 1 deletions
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)) ; |