Fix HWI + -unsigned in combine.c
authorRichard Sandiford <richard.sandiford@linaro.org>
Mon, 23 Oct 2017 06:07:26 +0000 (06:07 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 23 Oct 2017 06:07:26 +0000 (06:07 +0000)
commit735d873d7b6d3310a96b548cdc2d61f236937e7f
tree4f86a2e953095b545d73efdd1a8123a03a35c9ab
parent431c441740d9ec6f026576703f4daf280a4708f5
Fix HWI + -unsigned in combine.c

rtx_equal_for_field_assignment_p had:

  x = adjust_address_nv (x, GET_MODE (y),
       -subreg_lowpart_offset (GET_MODE (x),
       GET_MODE (y)));

But subreg_lowpart_offset returns an unsigned int and
adjust_address_nv takes a HWI, so a subreg offset of 4 would
give a memory offset of 0x00000000fffffffffc.

2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* combine.c (rtx_equal_for_field_assignment_p): Use
byte_lowpart_offset.

From-SVN: r253997
gcc/ChangeLog
gcc/combine.c