diff options
author | Richard Guenther <rguenther@suse.de> | 2016-11-14 15:42:40 +0100 |
---|---|---|
committer | Richard Guenther <rguenther@suse.de> | 2016-11-14 15:42:40 +0100 |
commit | ca94f8c64654980144e88fb19b04adf5f023aa55 (patch) | |
tree | ef90f8461d210f78e7f7b0ba89923a5eda7b3758 /gcc/combine.c | |
parent | 9e872f3fe8b4f6624e2edf5ee55a833e53f290c8 (diff) | |
parent | 5dc46e164993bbf658f61069823a1b37a2d715eb (diff) | |
download | gcc-gimplefe.tar.gz |
Merge remote-tracking branch 'trunk' of git://gcc.gnu.org/git/gcc into gimplefegimplefe
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 6ffa387a95c..6b7bdd0f687 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -9895,18 +9895,17 @@ reg_nonzero_bits_for_combine (const_rtx x, machine_mode mode, (DF_LR_IN (ENTRY_BLOCK_PTR_FOR_FN (cfun)->next_bb), REGNO (x))))) { - unsigned HOST_WIDE_INT mask = rsp->last_set_nonzero_bits; - - if (GET_MODE_PRECISION (rsp->last_set_mode) < GET_MODE_PRECISION (mode)) - /* We don't know anything about the upper bits. */ - mask |= GET_MODE_MASK (mode) ^ GET_MODE_MASK (rsp->last_set_mode); - - *nonzero &= mask; + /* Note that, even if the precision of last_set_mode is lower than that + of mode, record_value_for_reg invoked nonzero_bits on the register + with nonzero_bits_mode (because last_set_mode is necessarily integral + and HWI_COMPUTABLE_MODE_P in this case) so bits in nonzero_bits_mode + are all valid, hence in mode too since nonzero_bits_mode is defined + to the largest HWI_COMPUTABLE_MODE_P mode. */ + *nonzero &= rsp->last_set_nonzero_bits; return NULL; } tem = get_last_value (x); - if (tem) { if (SHORT_IMMEDIATES_SIGN_EXTEND) @@ -9915,7 +9914,8 @@ reg_nonzero_bits_for_combine (const_rtx x, machine_mode mode, return tem; } - else if (nonzero_sign_valid && rsp->nonzero_bits) + + if (nonzero_sign_valid && rsp->nonzero_bits) { unsigned HOST_WIDE_INT mask = rsp->nonzero_bits; |