diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2011-07-06 14:44:30 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2011-07-06 14:44:30 +0000 |
commit | d0edd768de548507869ddec157f2e8b3551a6231 (patch) | |
tree | 95d75bc9dd3fb8ff5d3161011734bcfd2796c8bf /gcc/expmed.c | |
parent | e5cabdfba868da1d67a6fa317846dbd5dfd83ee5 (diff) | |
download | gcc-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/expmed.c')
-rw-r--r-- | gcc/expmed.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index e9b6016..567f98d 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -635,9 +635,8 @@ store_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, X) 0)) is (reg:N X). */ if (GET_CODE (xop0) == SUBREG && REG_P (SUBREG_REG (xop0)) - && (!TRULY_NOOP_TRUNCATION - (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (xop0))), - GET_MODE_BITSIZE (op_mode)))) + && (!TRULY_NOOP_TRUNCATION_MODES_P (GET_MODE (SUBREG_REG (xop0)), + op_mode))) { rtx tem = gen_reg_rtx (op_mode); emit_move_insn (tem, xop0); @@ -1304,8 +1303,7 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, ? bitpos + bitsize == BITS_PER_WORD : bitpos == 0))) && ((!MEM_P (op0) - && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode1), - GET_MODE_BITSIZE (GET_MODE (op0))) + && TRULY_NOOP_TRUNCATION_MODES_P (mode1, GET_MODE (op0)) && GET_MODE_SIZE (mode1) != 0 && byte_offset % GET_MODE_SIZE (mode1) == 0) || (MEM_P (op0) @@ -1475,8 +1473,7 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, mode. Instead, create a temporary and use convert_move to set the target. */ if (REG_P (xtarget) - && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (GET_MODE (xtarget)), - GET_MODE_BITSIZE (ext_mode))) + && TRULY_NOOP_TRUNCATION_MODES_P (GET_MODE (xtarget), ext_mode)) { xtarget = gen_lowpart (ext_mode, xtarget); if (GET_MODE_SIZE (ext_mode) |