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
+2017-10-23 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * combine.c (rtx_equal_for_field_assignment_p): Use
+ byte_lowpart_offset.
+
2017-10-22 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
return 0;
if (BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN)
return 0;
- /* For big endian, adjust the memory offset. */
- if (BYTES_BIG_ENDIAN)
- x = adjust_address_nv (x, GET_MODE (y),
- -subreg_lowpart_offset (GET_MODE (x),
- GET_MODE (y)));
- else
- x = adjust_address_nv (x, GET_MODE (y), 0);
+ x = adjust_address_nv (x, GET_MODE (y),
+ byte_lowpart_offset (GET_MODE (y),
+ GET_MODE (x)));
}
if (x == y || rtx_equal_p (x, y))