aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2011-07-06 14:44:30 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2011-07-06 14:44:30 +0000
commitd0edd768de548507869ddec157f2e8b3551a6231 (patch)
tree95d75bc9dd3fb8ff5d3161011734bcfd2796c8bf /gcc/expr.c
parente5cabdfba868da1d67a6fa317846dbd5dfd83ee5 (diff)
downloadgcc-d0edd768de548507869ddec157f2e8b3551a6231.zip
gcc-d0edd768de548507869ddec157f2e8b3551a6231.tar.gz
gcc-d0edd768de548507869ddec157f2e8b3551a6231.tar.bz2
machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): New macro.
* machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): New macro. * combine.c (make_extraction, gen_lowpart_or_truncate, apply_distributive_law, simplify_comparison, reg_truncated_to_mode, record_truncated_value): Use it. * cse.c (notreg_cost): Likewise. * expmed.c (store_bit_field_1, extract_bit_field_1): Likewise. * expr.c (convert_move, convert_modes): Likewise. * optabs.c (expand_binop, expand_unop): Likewise. * postreload.c (move2add_last_label): Likewise. * regmove.c (optimize_reg_copy_3): Likewise. * rtlhooks.c (gen_lowpart_general): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. From-SVN: r175921
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index e225d24..fd431c2 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -586,8 +586,7 @@ convert_move (rtx to, rtx from, int unsignedp)
/* For truncation, usually we can just refer to FROM in a narrower mode. */
if (GET_MODE_BITSIZE (to_mode) < GET_MODE_BITSIZE (from_mode)
- && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (to_mode),
- GET_MODE_BITSIZE (from_mode)))
+ && TRULY_NOOP_TRUNCATION_MODES_P (to_mode, from_mode))
{
if (!((MEM_P (from)
&& ! MEM_VOLATILE_P (from)
@@ -625,8 +624,7 @@ convert_move (rtx to, rtx from, int unsignedp)
if (((can_extend_p (to_mode, intermediate, unsignedp)
!= CODE_FOR_nothing)
|| (GET_MODE_SIZE (to_mode) < GET_MODE_SIZE (intermediate)
- && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (to_mode),
- GET_MODE_BITSIZE (intermediate))))
+ && TRULY_NOOP_TRUNCATION_MODES_P (to_mode, intermediate)))
&& (can_extend_p (intermediate, from_mode, unsignedp)
!= CODE_FOR_nothing))
{
@@ -754,8 +752,8 @@ convert_modes (enum machine_mode mode, enum machine_mode oldmode, rtx x, int uns
|| (REG_P (x)
&& (! HARD_REGISTER_P (x)
|| HARD_REGNO_MODE_OK (REGNO (x), mode))
- && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
- GET_MODE_BITSIZE (GET_MODE (x)))))))))
+ && TRULY_NOOP_TRUNCATION_MODES_P (mode,
+ GET_MODE (x))))))))
{
/* ?? If we don't know OLDMODE, we have to assume here that
X does not need sign- or zero-extension. This may not be