diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-10-22 21:11:01 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-10-22 21:11:01 +0000 |
commit | 1e3734f59eee29ed335da8fc9f40e66903f64b20 (patch) | |
tree | 51203651e08ac8824d7052d06963b16ff7492539 /gcc/ree.c | |
parent | e10326ff910ab337741d0781a536435d51c5f044 (diff) | |
download | gcc-1e3734f59eee29ed335da8fc9f40e66903f64b20.zip gcc-1e3734f59eee29ed335da8fc9f40e66903f64b20.tar.gz gcc-1e3734f59eee29ed335da8fc9f40e66903f64b20.tar.bz2 |
Make more use of HWI_COMPUTABLE_MODE_P
This patch uses HWI_COMPUTABLE_MODE_P (X) instead of
GET_MODE_PRECISION (X) <= HOST_BITS_PER_WIDE_INT in cases
where X also needs to be a scalar integer.
2017-10-22 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* combine.c (simplify_comparison): Use HWI_COMPUTABLE_MODE_P.
(record_promoted_value): Likewise.
* expr.c (expand_expr_real_2): Likewise.
* ree.c (update_reg_equal_equiv_notes): Likewise.
(combine_set_extension): Likewise.
* rtlanal.c (low_bitmask_len): Likewise.
* simplify-rtx.c (neg_const_int): Likewise.
(simplify_binary_operation_1): Likewise.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r253990
Diffstat (limited to 'gcc/ree.c')
-rw-r--r-- | gcc/ree.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -269,7 +269,7 @@ update_reg_equal_equiv_notes (rtx_insn *insn, machine_mode new_mode, /* Update equivalency constants. Recall that RTL constants are sign-extended. */ if (GET_CODE (orig_src) == CONST_INT - && HOST_BITS_PER_WIDE_INT >= GET_MODE_BITSIZE (new_mode)) + && HWI_COMPUTABLE_MODE_P (new_mode)) { if (INTVAL (orig_src) >= 0 || code == SIGN_EXTEND) /* Nothing needed. */; @@ -337,7 +337,7 @@ combine_set_extension (ext_cand *cand, rtx_insn *curr_insn, rtx *orig_set) /* Merge constants by directly moving the constant into the register under some conditions. Recall that RTL constants are sign-extended. */ if (GET_CODE (orig_src) == CONST_INT - && HOST_BITS_PER_WIDE_INT >= GET_MODE_BITSIZE (cand->mode)) + && HWI_COMPUTABLE_MODE_P (cand->mode)) { if (INTVAL (orig_src) >= 0 || cand->code == SIGN_EXTEND) new_set = gen_rtx_SET (new_reg, orig_src); |