The current code in reg_nonzero_bits_for_combine allows using the
reg_stat info when last_set_mode is a different integer mode. This is
completely wrong for non-pseudos. For example, as in the PR, a value
in a DImode hard register is set by eight writes to its constituent
QImode parts. The value written to the DImode is not the same as that
written to the lowest-numbered QImode!
PR rtl-optimization/85805
* combine.c (reg_nonzero_bits_for_combine): Only use the last set
value for hard registers if that was written in the same mode.
From-SVN: r262994
+2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR rtl-optimization/85805
+ * combine.c (reg_nonzero_bits_for_combine): Only use the last set
+ value for hard registers if that was written in the same mode.
+
2018-07-26 Martin Liska <mliska@suse.cz>
- PR gcov-profile/86536
+ PR gcov-profile/86536
* gcov.c (format_gcov): Use printf format %.*f directly
- and do not handle special values.
+ and do not handle special values.
2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
rsp = ®_stat[REGNO (x)];
if (rsp->last_set_value != 0
&& (rsp->last_set_mode == mode
- || (GET_MODE_CLASS (rsp->last_set_mode) == MODE_INT
+ || (REGNO (x) >= FIRST_PSEUDO_REGISTER
+ && GET_MODE_CLASS (rsp->last_set_mode) == MODE_INT
&& GET_MODE_CLASS (mode) == MODE_INT))
&& ((rsp->last_set_label >= label_tick_ebb_start
&& rsp->last_set_label < label_tick)