[patch] Fix PR71976 in combine.c:get_last_value()

Georg-Johann Lay avr@gjlay.de
Fri Jul 29 08:56:00 GMT 2016


The issue with wrong-code bug PR71976 is that combine.c:get_last_value was 
called for a hard register in a wider mode (DImode) than the stored value had 
(QImode).  The patch introduces a test of the mode precision and only returns 
the recorded value if the according mode is not smaller than the mode for which 
get_last_value is called.

Segher already tested the patch on 32 different (sub-)architectures of Linux 
without any regression, cf.

https://gcc.gnu.org/ml/gcc/2016-07/msg00215.html

Ok for trunk and to backport?


Johann

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr71976.diff
Type: text/x-patch
Size: 641 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160729/78467924/attachment.bin>


More information about the Gcc-patches mailing list