diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2011-07-06 23:11:51 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2011-07-06 23:11:51 +0000 |
commit | 6a4bdc797621dbf63470b88dcd50095571b0fe1d (patch) | |
tree | 5f9f7faef58377378ef03c74cddbf4a06d8c42d4 /gcc/cse.c | |
parent | 76594d53186a78667bbb7b25f9231c396509a0a2 (diff) | |
download | gcc-6a4bdc797621dbf63470b88dcd50095571b0fe1d.zip gcc-6a4bdc797621dbf63470b88dcd50095571b0fe1d.tar.gz gcc-6a4bdc797621dbf63470b88dcd50095571b0fe1d.tar.bz2 |
emit-rtl.c (paradoxical_subreg_p): New function.
* emit-rtl.c (paradoxical_subreg_p): New function.
* rtl.h (paradoxical_subreg_p): Declare.
* combine.c (set_nonzero_bits_and_sign_copies, get_last_value,
apply_distributive_law, simplify_comparison, simplify_set): Use it.
* cse.c (record_jump_cond, cse_insn): Likewise.
* expr.c (force_operand): Likewise.
* rtlanal.c (num_sign_bit_copies1): Likewise.
* reload1.c (eliminate_regs_1, strip_paradoxical_subreg): Likewise.
* reload.c (push_secondary_reload, find_reloads_toplev): Likewise.
(push_reload): Use precision to check for paradoxical subregs.
* expmed.c (extract_bit_field_1): Likewise.
From-SVN: r175944
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 24 |
1 files changed, 6 insertions, 18 deletions
@@ -3959,9 +3959,7 @@ record_jump_cond (enum rtx_code code, enum machine_mode mode, rtx op0, is not worth testing for with no SUBREG). */ /* Note that GET_MODE (op0) may not equal MODE. */ - if (code == EQ && GET_CODE (op0) == SUBREG - && (GET_MODE_SIZE (GET_MODE (op0)) - > GET_MODE_SIZE (GET_MODE (SUBREG_REG (op0))))) + if (code == EQ && paradoxical_subreg_p (op0)) { enum machine_mode inner_mode = GET_MODE (SUBREG_REG (op0)); rtx tem = record_jump_cond_subreg (inner_mode, op1); @@ -3970,9 +3968,7 @@ record_jump_cond (enum rtx_code code, enum machine_mode mode, rtx op0, reversed_nonequality); } - if (code == EQ && GET_CODE (op1) == SUBREG - && (GET_MODE_SIZE (GET_MODE (op1)) - > GET_MODE_SIZE (GET_MODE (SUBREG_REG (op1))))) + if (code == EQ && paradoxical_subreg_p (op1)) { enum machine_mode inner_mode = GET_MODE (SUBREG_REG (op1)); rtx tem = record_jump_cond_subreg (inner_mode, op0); @@ -4556,9 +4552,7 @@ cse_insn (rtx insn) treat it as volatile. It may do the work of an SI in one context where the extra bits are not being used, but cannot replace an SI in general. */ - if (GET_CODE (src) == SUBREG - && (GET_MODE_SIZE (GET_MODE (src)) - > GET_MODE_SIZE (GET_MODE (SUBREG_REG (src))))) + if (paradoxical_subreg_p (src)) sets[i].src_volatile = 1; #endif @@ -4836,9 +4830,7 @@ cse_insn (rtx insn) /* Also skip paradoxical subregs, unless that's what we're looking for. */ - if (code == SUBREG - && (GET_MODE_SIZE (GET_MODE (p->exp)) - > GET_MODE_SIZE (GET_MODE (SUBREG_REG (p->exp)))) + if (paradoxical_subreg_p (p->exp) && ! (src != 0 && GET_CODE (src) == SUBREG && GET_MODE (src) == GET_MODE (p->exp) @@ -4947,9 +4939,7 @@ cse_insn (rtx insn) size, but later may be adjusted so that the upper bits aren't what we want. So reject it. */ if (elt != 0 - && GET_CODE (elt->exp) == SUBREG - && (GET_MODE_SIZE (GET_MODE (elt->exp)) - > GET_MODE_SIZE (GET_MODE (SUBREG_REG (elt->exp)))) + && paradoxical_subreg_p (elt->exp) /* It is okay, though, if the rtx we're trying to match will ignore any of the bits we can't predict. */ && ! (src != 0 @@ -5710,9 +5700,7 @@ cse_insn (rtx insn) some tracking to be wrong. ??? Think about this more later. */ - || (GET_CODE (dest) == SUBREG - && (GET_MODE_SIZE (GET_MODE (dest)) - > GET_MODE_SIZE (GET_MODE (SUBREG_REG (dest)))) + || (paradoxical_subreg_p (dest) && (GET_CODE (sets[i].src) == SIGN_EXTEND || GET_CODE (sets[i].src) == ZERO_EXTEND))) continue; |