aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorKugan Vivekanandarajah <kuganv@linaro.org>2014-08-08 05:24:12 +0000
committerKugan Vivekanandarajah <kugan@gcc.gnu.org>2014-08-08 05:24:12 +0000
commit362d42dcc965c63977160984292b3429c2d15de7 (patch)
treedc76a9c031ef039c59b55789766d2c9bad7a1fa0 /gcc/expr.c
parent07ad7382cfd7461069131d0bd23d9e88c1d089de (diff)
downloadgcc-362d42dcc965c63977160984292b3429c2d15de7.zip
gcc-362d42dcc965c63977160984292b3429c2d15de7.tar.gz
gcc-362d42dcc965c63977160984292b3429c2d15de7.tar.bz2
calls.c (precompute_arguments): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET.
gcc/ 2014-08-08 Kugan Vivekanandarajah <kuganv@linaro.org> * calls.c (precompute_arguments): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. (expand_call): Likewise. * cfgexpand.c (expand_gimple_stmt_1): Use SUBREG_PROMOTED_SIGN to get promoted mode. * combine.c (record_promoted_value): Skip > 0 comparison with SUBREG_PROMOTED_UNSIGNED_P as it now returns only 0 or 1. * expr.c (convert_move): Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P. (convert_modes): Likewise. (store_expr): Use SUBREG_PROMOTED_SIGN to get promoted mode. Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P. (expand_expr_real_1): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. * function.c (assign_parm_setup_reg): Use new SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. * ifcvt.c (noce_emit_cmove): Updated to use SUBREG_PROMOTED_GET and SUBREG_PROMOTED_SET. * internal-fn.c (ubsan_expand_si_overflow_mul_check): Use SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_SET. * optabs.c (widen_operand): Use SUBREG_CHECK_PROMOTED_SIGN instead of SUBREG_PROMOTED_UNSIGNED_P. * rtl.h (SUBREG_PROMOTED_UNSIGNED_SET): Remove. (SUBREG_PROMOTED_SET): New define. (SUBREG_PROMOTED_GET): Likewise. (SUBREG_PROMOTED_SIGN): Likewise. (SUBREG_PROMOTED_SIGNED_P): Likewise. (SUBREG_CHECK_PROMOTED_SIGN): Likewise. (SUBREG_PROMOTED_UNSIGNED_P): Updated. * rtlanal.c (unsigned_reg_p): Use new SUBREG_PROMOTED_GET instead of SUBREG_PROMOTED_UNSIGNED_GET. (nonzero_bits1): Skip > 0 comparison with the results as SUBREG_PROMOTED_UNSIGNED_P now returns only 0 or 1. (num_sign_bit_copies1): Use SUBREG_PROMOTED_SIGNED_P instead of !SUBREG_PROMOTED_UNSIGNED_P. * simplify-rtx.c (simplify_unary_operation_1): Use new SUBREG_PROMOTED_SIGNED_P instead of !SUBREG_PROMOTED_UNSIGNED_P. (simplify_subreg): Use new SUBREG_PROMOTED_SIGNED_P, SUBREG_PROMOTED_UNSIGNED_P and SUBREG_PROMOTED_SET instead of SUBREG_PROMOTED_UNSIGNED_P and SUBREG_PROMOTED_UNSIGNED_SET. From-SVN: r213749
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index d8328ee..1242031 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -329,7 +329,7 @@ convert_move (rtx to, rtx from, int unsignedp)
if (GET_CODE (from) == SUBREG && SUBREG_PROMOTED_VAR_P (from)
&& (GET_MODE_PRECISION (GET_MODE (SUBREG_REG (from)))
>= GET_MODE_PRECISION (to_mode))
- && SUBREG_PROMOTED_UNSIGNED_P (from) == unsignedp)
+ && SUBREG_CHECK_PROMOTED_SIGN (from, unsignedp))
from = gen_lowpart (to_mode, from), from_mode = to_mode;
gcc_assert (GET_CODE (to) != SUBREG || !SUBREG_PROMOTED_VAR_P (to));
@@ -703,7 +703,7 @@ convert_modes (enum machine_mode mode, enum machine_mode oldmode, rtx x, int uns
if (GET_CODE (x) == SUBREG && SUBREG_PROMOTED_VAR_P (x)
&& GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) >= GET_MODE_SIZE (mode)
- && SUBREG_PROMOTED_UNSIGNED_P (x) == unsignedp)
+ && SUBREG_CHECK_PROMOTED_SIGN (x, unsignedp))
x = gen_lowpart (mode, SUBREG_REG (x));
if (GET_MODE (x) != VOIDmode)
@@ -5202,25 +5202,25 @@ store_expr (tree exp, rtx target, int call_param_p, bool nontemporal)
&& GET_MODE_PRECISION (GET_MODE (target))
== TYPE_PRECISION (TREE_TYPE (exp)))
{
- if (TYPE_UNSIGNED (TREE_TYPE (exp))
- != SUBREG_PROMOTED_UNSIGNED_P (target))
+ if (!SUBREG_CHECK_PROMOTED_SIGN (target,
+ TYPE_UNSIGNED (TREE_TYPE (exp))))
{
/* Some types, e.g. Fortran's logical*4, won't have a signed
version, so use the mode instead. */
tree ntype
= (signed_or_unsigned_type_for
- (SUBREG_PROMOTED_UNSIGNED_P (target), TREE_TYPE (exp)));
+ (SUBREG_PROMOTED_SIGN (target), TREE_TYPE (exp)));
if (ntype == NULL)
ntype = lang_hooks.types.type_for_mode
(TYPE_MODE (TREE_TYPE (exp)),
- SUBREG_PROMOTED_UNSIGNED_P (target));
+ SUBREG_PROMOTED_SIGN (target));
exp = fold_convert_loc (loc, ntype, exp);
}
exp = fold_convert_loc (loc, lang_hooks.types.type_for_mode
(GET_MODE (SUBREG_REG (target)),
- SUBREG_PROMOTED_UNSIGNED_P (target)),
+ SUBREG_PROMOTED_SIGN (target)),
exp);
inner_target = SUBREG_REG (target);
@@ -5234,14 +5234,14 @@ store_expr (tree exp, rtx target, int call_param_p, bool nontemporal)
if (CONSTANT_P (temp) && GET_MODE (temp) == VOIDmode)
{
temp = convert_modes (GET_MODE (target), TYPE_MODE (TREE_TYPE (exp)),
- temp, SUBREG_PROMOTED_UNSIGNED_P (target));
+ temp, SUBREG_PROMOTED_SIGN (target));
temp = convert_modes (GET_MODE (SUBREG_REG (target)),
GET_MODE (target), temp,
- SUBREG_PROMOTED_UNSIGNED_P (target));
+ SUBREG_PROMOTED_SIGN (target));
}
convert_move (SUBREG_REG (target), temp,
- SUBREG_PROMOTED_UNSIGNED_P (target));
+ SUBREG_PROMOTED_SIGN (target));
return NULL_RTX;
}
@@ -9527,7 +9527,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
temp = gen_lowpart_SUBREG (mode, decl_rtl);
SUBREG_PROMOTED_VAR_P (temp) = 1;
- SUBREG_PROMOTED_UNSIGNED_SET (temp, unsignedp);
+ SUBREG_PROMOTED_SET (temp, unsignedp);
return temp;
}