gcc/
PR rtl-optimization/71976
* combine.c (get_last_value): Return 0 if the argument for which
the function is called has a wider mode than the recorded value.
Co-Authored-By: Georg-Johann Lay <avr@gjlay.de>
From-SVN: r238863
+2016-07-29 Segher Boessenkool <segher@kernel.crashing.org>
+ Georg-Johann Lay <avr@gjlay.de>
+
+ PR rtl-optimization/71976
+ * combine.c (get_last_value): Return 0 if the argument for which
+ the function is called has a wider mode than the recorded value.
+
2016-07-29 Marek Polacek <polacek@redhat.com>
PR c/7652
&& DF_INSN_LUID (rsp->last_set) >= subst_low_luid)
return 0;
+ /* If fewer bits were set than what we are asked for now, we cannot use
+ the value. */
+ if (GET_MODE_PRECISION (rsp->last_set_mode)
+ < GET_MODE_PRECISION (GET_MODE (x)))
+ return 0;
+
/* If the value has all its registers valid, return it. */
if (get_last_value_validate (&value, rsp->last_set, rsp->last_set_label, 0))
return value;