poly_int: get_bit_range
authorRichard Sandiford <richard.sandiford@linaro.org>
Thu, 21 Dec 2017 06:57:18 +0000 (06:57 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 21 Dec 2017 06:57:18 +0000 (06:57 +0000)
commit39bb8924559d0487fb7cb6d4dc33d6b1e9c41004
tree9887f91a47e5c46de73b822b210ba630c6b62cf2
parenta97d8b982793ba5bf1e54a41d9bb110182b8baf8
poly_int: get_bit_range

This patch makes get_bit_range return the range and position as poly_ints.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* expr.h (get_bit_range): Return the bitstart and bitend as
poly_uint64s rather than unsigned HOST_WIDE_INTs.  Return the bitpos
as a poly_int64 rather than a HOST_WIDE_INT.
* expr.c (get_bit_range): Likewise.
(expand_assignment): Update call accordingly.
* fold-const.c (optimize_bit_field_compare): Likewise.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r255912
gcc/ChangeLog
gcc/expr.c
gcc/expr.h
gcc/fold-const.c