diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-06 14:44:30 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-06 14:44:30 +0000 |
commit | 396f21304b3d9cdcaea3b88994cb049952ffc9cb (patch) | |
tree | 95d75bc9dd3fb8ff5d3161011734bcfd2796c8bf /gcc/combine.c | |
parent | b60af16f749ec4e5611c886b5ce7a80a64f62b6f (diff) | |
download | gcc-396f21304b3d9cdcaea3b88994cb049952ffc9cb.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175921 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 7ac4613955c..9edfdd18b1c 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -7146,8 +7146,7 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos, && !MEM_P (inner) && (inner_mode == tmode || !REG_P (inner) - || TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (tmode), - GET_MODE_BITSIZE (inner_mode)) + || TRULY_NOOP_TRUNCATION_MODES_P (tmode, inner_mode) || reg_truncated_to_mode (tmode, inner)) && (! in_dest || (REG_P (inner) @@ -7416,8 +7415,8 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos, /* On the LHS, don't create paradoxical subregs implicitely truncating the register unless TRULY_NOOP_TRUNCATION. */ if (in_dest - && !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (GET_MODE (inner)), - GET_MODE_BITSIZE (wanted_inner_mode))) + && !TRULY_NOOP_TRUNCATION_MODES_P (GET_MODE (inner), + wanted_inner_mode)) return NULL_RTX; if (GET_MODE (inner) != wanted_inner_mode @@ -8053,8 +8052,7 @@ gen_lowpart_or_truncate (enum machine_mode mode, rtx x) { if (!CONST_INT_P (x) && GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (x)) - && !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode), - GET_MODE_BITSIZE (GET_MODE (x))) + && !TRULY_NOOP_TRUNCATION_MODES_P (mode, GET_MODE (x)) && !(REG_P (x) && reg_truncated_to_mode (mode, x))) { /* Bit-cast X into an integer mode. */ @@ -9268,9 +9266,8 @@ apply_distributive_law (rtx x) || GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs))) > UNITS_PER_WORD /* Result might need to be truncated. Don't change mode if explicit truncation is needed. */ - || !TRULY_NOOP_TRUNCATION - (GET_MODE_BITSIZE (GET_MODE (x)), - GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (lhs))))) + || !TRULY_NOOP_TRUNCATION_MODES_P (GET_MODE (x), + GET_MODE (SUBREG_REG (lhs)))) return x; tem = simplify_gen_binary (code, GET_MODE (SUBREG_REG (lhs)), @@ -11699,8 +11696,7 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1) + 1)) >= 0 && const_op >> i == 0 && (tmode = mode_for_size (i, MODE_INT, 1)) != BLKmode - && (TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (tmode), - GET_MODE_BITSIZE (GET_MODE (op0))) + && (TRULY_NOOP_TRUNCATION_MODES_P (tmode, GET_MODE (op0)) || (REG_P (XEXP (op0, 0)) && reg_truncated_to_mode (tmode, XEXP (op0, 0))))) { @@ -12513,8 +12509,7 @@ reg_truncated_to_mode (enum machine_mode mode, const_rtx x) return false; if (GET_MODE_SIZE (truncated) <= GET_MODE_SIZE (mode)) return true; - if (TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode), - GET_MODE_BITSIZE (truncated))) + if (TRULY_NOOP_TRUNCATION_MODES_P (mode, truncated)) return true; return false; } @@ -12539,8 +12534,7 @@ record_truncated_value (rtx *p, void *data ATTRIBUTE_UNUSED) if (GET_MODE_SIZE (original_mode) <= GET_MODE_SIZE (truncated_mode)) return -1; - if (TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (truncated_mode), - GET_MODE_BITSIZE (original_mode))) + if (TRULY_NOOP_TRUNCATION_MODES_P (truncated_mode, original_mode)) return -1; x = SUBREG_REG (x); |