aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-10-22 21:11:01 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-10-22 21:11:01 +0000
commit1e3734f59eee29ed335da8fc9f40e66903f64b20 (patch)
tree51203651e08ac8824d7052d06963b16ff7492539 /gcc/combine.c
parente10326ff910ab337741d0781a536435d51c5f044 (diff)
downloadgcc-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/combine.c')
-rw-r--r--gcc/combine.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index a58bb1e..3b912fa 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -11976,10 +11976,9 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
if (paradoxical_subreg_p (inner_op0)
&& GET_CODE (inner_op1) == SUBREG
+ && HWI_COMPUTABLE_MODE_P (GET_MODE (SUBREG_REG (inner_op0)))
&& (GET_MODE (SUBREG_REG (inner_op0))
== GET_MODE (SUBREG_REG (inner_op1)))
- && (GET_MODE_PRECISION (GET_MODE (SUBREG_REG (inner_op0)))
- <= HOST_BITS_PER_WIDE_INT)
&& (0 == ((~c0) & nonzero_bits (SUBREG_REG (inner_op0),
GET_MODE (SUBREG_REG (inner_op0)))))
&& (0 == ((~c1) & nonzero_bits (SUBREG_REG (inner_op1),
@@ -13318,7 +13317,7 @@ record_promoted_value (rtx_insn *insn, rtx subreg)
unsigned int regno = REGNO (SUBREG_REG (subreg));
machine_mode mode = GET_MODE (subreg);
- if (GET_MODE_PRECISION (mode) > HOST_BITS_PER_WIDE_INT)
+ if (!HWI_COMPUTABLE_MODE_P (mode))
return;
for (links = LOG_LINKS (insn); links;)